diff options
| author | Chris McDonough <chrism@plope.com> | 2011-08-22 02:36:20 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-08-22 02:36:20 -0400 |
| commit | 01815e030d093fb95c3051025e3a26a0a8f6b22a (patch) | |
| tree | 3c847440abdacd48ad32d8a6d06c1d350d9c3d78 /docs | |
| parent | 9573ac26e7443ca9f7aa9ee17172d65c8e9774b7 (diff) | |
| download | pyramid-01815e030d093fb95c3051025e3a26a0a8f6b22a.tar.gz pyramid-01815e030d093fb95c3051025e3a26a0a8f6b22a.tar.bz2 pyramid-01815e030d093fb95c3051025e3a26a0a8f6b22a.zip | |
fix stray inclusion of weberror; move manifest description
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/MyProject/setup.py | 2 | ||||
| -rw-r--r-- | docs/narr/project.rst | 79 |
2 files changed, 39 insertions, 42 deletions
diff --git a/docs/narr/MyProject/setup.py b/docs/narr/MyProject/setup.py index a0b6fab9e..5203fc2a7 100644 --- a/docs/narr/MyProject/setup.py +++ b/docs/narr/MyProject/setup.py @@ -6,7 +6,7 @@ here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() -requires = ['pyramid', 'pyramid_debugtoolbar', 'WebError'] +requires = ['pyramid', 'pyramid_debugtoolbar'] setup(name='MyProject', version='0.0', diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 3fe0ed6a8..2bd2122c3 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -542,6 +542,37 @@ well as ``.py`` files. See http://docs.python.org/distutils/sourcedist.html#the-manifest-in-template for more information about the syntax and usage of ``MANIFEST.in``. +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 scaffolds 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. + .. index:: single: setup.py @@ -557,7 +588,8 @@ testing your application, packaging, and distributing your application. ``setup.py`` is the defacto standard which Python developers use to distribute their reusable code. You can read more about ``setup.py`` files and their usage in the `Setuptools documentation - <http://peak.telecommunity.com/DevCenter/setuptools>`_. + <http://peak.telecommunity.com/DevCenter/setuptools>`_ and `The + Hitchhiker's Guide to Packaging <http://guide.python-distribute.org/>`_. Our generated ``setup.py`` looks like this: @@ -595,12 +627,10 @@ will be run when ``setup.py test`` is invoked. We examined ``entry_points`` in our discussion of the ``development.ini`` file; this file defines the ``main`` entry point that represents our project's application. -A more exhaustive explanation of the purpose and composition of ``setup.py`` -is available at `The Hitchhiker's Guide to Packaging -<http://guide.python-distribute.org/>`_. Usually you only need to think -about the contents of the ``setup.py`` file when distributing your -application to other people, or when versioning your application for your own -use. For fun, you can try this command now: +Usually you only need to think about the contents of the ``setup.py`` file +when distributing your application to other people, when adding Python +package dependencies, or when versioning your application for your own use. +For fun, you can try this command now: .. code-block:: text @@ -608,40 +638,7 @@ use. For fun, you can try this command now: This will create a tarball of your application in a ``dist`` subdirectory named ``MyProject-0.1.tar.gz``. You can send this tarball to other people -who want to use your application. - -.. warning:: - - 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 scaffolds 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. +who want to install and use your application. .. index:: single: setup.cfg |
