From 47442fb154eae5c6cd71a54e9b4aeee484e1c38b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 21 Jan 2011 20:05:09 -0500 Subject: - Add a ``MANIFEST.in`` file to each paster template. See https://github.com/Pylons/pyramid/issues#issue/95 Closes issue #95. --- docs/narr/MyProject/MANIFEST.in | 2 + docs/narr/project.rst | 47 ++++++++++++++++------ docs/tutorials/wiki/distributing.rst | 7 ---- docs/tutorials/wiki/src/authorization/MANIFEST.in | 2 + docs/tutorials/wiki/src/basiclayout/MANIFEST.in | 2 + docs/tutorials/wiki/src/models/MANIFEST.in | 2 + docs/tutorials/wiki/src/views/MANIFEST.in | 2 + docs/tutorials/wiki2/distributing.rst | 7 ---- docs/tutorials/wiki2/src/authorization/MANIFEST.in | 2 + docs/tutorials/wiki2/src/basiclayout/MANIFEST.in | 2 + docs/tutorials/wiki2/src/models/MANIFEST.in | 2 + docs/tutorials/wiki2/src/views/MANIFEST.in | 2 + 12 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 docs/narr/MyProject/MANIFEST.in create mode 100644 docs/tutorials/wiki/src/authorization/MANIFEST.in create mode 100644 docs/tutorials/wiki/src/basiclayout/MANIFEST.in create mode 100644 docs/tutorials/wiki/src/models/MANIFEST.in create mode 100644 docs/tutorials/wiki/src/views/MANIFEST.in create mode 100644 docs/tutorials/wiki2/src/authorization/MANIFEST.in create mode 100644 docs/tutorials/wiki2/src/basiclayout/MANIFEST.in create mode 100644 docs/tutorials/wiki2/src/models/MANIFEST.in create mode 100644 docs/tutorials/wiki2/src/views/MANIFEST.in (limited to 'docs') diff --git a/docs/narr/MyProject/MANIFEST.in b/docs/narr/MyProject/MANIFEST.in new file mode 100644 index 000000000..304bd817c --- /dev/null +++ b/docs/narr/MyProject/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include myproject *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/narr/project.rst b/docs/narr/project.rst index b5ea658a7..c076c67ac 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -470,6 +470,7 @@ structure: MyProject/ |-- CHANGES.txt |-- development.ini + |-- MANIFEST.in |-- myproject | |-- __init__.py | |-- resources.py @@ -509,6 +510,10 @@ describe, run, and test your application. #. ``setup.cfg`` is a :term:`setuptools` configuration file used by ``setup.py``. +#. ``MANIFEST.in`` is a :term:`distutils` "manifest" file, naming which files + should be included in a source distribution of the package when ``python + setup.py sdist`` is run. + #. ``setup.py`` is the file you'll use to test and distribute your application. It is a standard :term:`setuptools` ``setup.py`` file. @@ -711,18 +716,36 @@ who want to use your application. .. warning:: - By default, ``setup.py sdist`` does not place non-Python-source files in - generated tarballs. This means, in this case, that the - ``templates/mytemplate.pt`` file and the files in the ``static`` directory - are not packaged in the tarball. To allow this to happen, check all the - files that you'd like to be distributed along with your application's - Python files into Subversion. After you do this, when you rerun - ``setup.py sdist``, all files checked into the version control system will - be included in the tarball. If you don't use Subversion, and instead use - a different version control system, you may need to install a setuptools - add-on such as ``setuptools-git`` or ``setuptools-hg`` for this behavior - to work properly. Alternatively, you can specify the non-Python-source - files by hand in a ``manifest template``, called ``MANIFEST.in`` by default. + Without the presence of a ``MANIFEST.in`` file or without checking your + source code into a version control repository, ``setup.py sdist`` places + only *Python source files* (files ending with a ``.py`` extension) into + tarballs generated by ``python setup.py sdist``. This means, for example, + if your project was not checked into a setuptools-compatible source + control system, and your project directory didn't contain a ``MANIFEST.in`` + file that told the ``sdist`` machinery to include ``*.pt`` files, the + ``myproject/templates/mytemplate.pt`` file would not be included in the + generated tarball. + + Projects generated by Pyramid paster templates include a default + ``MANIFEST.in`` file. The ``MANIFEST.in`` file contains declarations + which tell it to include files like ``*.pt``, ``*.css`` and ``*.js`` in + the generated tarball. If you include files with extensions other than + the files named in the project's ``MANIFEST.in`` and you don't make use of + a setuptools-compatible version control system, you'll need to edit the + ``MANIFEST.in`` file and include the statements necessary to include your + new files. See http://docs.python.org/distutils/sourcedist.html#principle + for more information about how to do this. + + You can also delete ``MANIFEST.in`` from your project and rely on a + setuptools feature which simply causes all files checked into a version + control system to be put into the generated tarball. To allow this to + happen, check all the files that you'd like to be distributed along with + your application's Python files into Subversion. After you do this, when + you rerun ``setup.py sdist``, all files checked into the version control + system will be included in the tarball. If you don't use Subversion, and + instead use a different version control system, you may need to install a + setuptools add-on such as ``setuptools-git`` or ``setuptools-hg`` for this + behavior to work properly. ``setup.cfg`` ~~~~~~~~~~~~~ diff --git a/docs/tutorials/wiki/distributing.rst b/docs/tutorials/wiki/distributing.rst index 855d54eab..ed0af222f 100644 --- a/docs/tutorials/wiki/distributing.rst +++ b/docs/tutorials/wiki/distributing.rst @@ -20,13 +20,6 @@ On Windows: c:\pyramidtut> ..\Scripts\python setup.py sdist -.. warning:: If your project files are not checked in to a version - control repository (such as Subversion), the dist tarball will - *not* contain all the files it needs to. In particular, it will - not contain non-Python-source files (such as templates and static - files). To ensure that these are included, check your files into a - version control repository before running ``setup.py sdist``. - The output of such a command will be something like: .. code-block:: text diff --git a/docs/tutorials/wiki/src/authorization/MANIFEST.in b/docs/tutorials/wiki/src/authorization/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki/src/authorization/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki/src/basiclayout/MANIFEST.in b/docs/tutorials/wiki/src/basiclayout/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki/src/basiclayout/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki/src/models/MANIFEST.in b/docs/tutorials/wiki/src/models/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki/src/models/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki/src/views/MANIFEST.in b/docs/tutorials/wiki/src/views/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki/src/views/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki2/distributing.rst b/docs/tutorials/wiki2/distributing.rst index 9f5db19ae..c80b43337 100644 --- a/docs/tutorials/wiki2/distributing.rst +++ b/docs/tutorials/wiki2/distributing.rst @@ -20,13 +20,6 @@ On Windows: c:\pyramidtut> ..\Scripts\python setup.py sdist -.. warning:: If your project files are not checked in to a version - control repository (such as Subversion), the dist tarball will - *not* contain all the files it needs to. In particular, it will - not contain non-Python-source files (such as templates and static - files). To ensure that these are included, check your files into a - version control repository before running ``setup.py sdist``. - The output of such a command will be something like: .. code-block:: text diff --git a/docs/tutorials/wiki2/src/authorization/MANIFEST.in b/docs/tutorials/wiki2/src/authorization/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki2/src/authorization/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki2/src/basiclayout/MANIFEST.in b/docs/tutorials/wiki2/src/basiclayout/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki2/src/basiclayout/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki2/src/models/MANIFEST.in b/docs/tutorials/wiki2/src/models/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki2/src/models/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js diff --git a/docs/tutorials/wiki2/src/views/MANIFEST.in b/docs/tutorials/wiki2/src/views/MANIFEST.in new file mode 100644 index 000000000..ad7b55103 --- /dev/null +++ b/docs/tutorials/wiki2/src/views/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt *.ini *.cfg *.rst +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.mak *.js -- cgit v1.2.3