This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Reid.Price
Recipients Reid.Price, docs@python
Date 2014-06-11.18:30:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402511415.47.0.115494695808.issue21726@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/2/distutils/examples.html#pure-python-distribution-by-package

Chrome on Linux

The last (parenthetical) sentence is not needed.

  "(Again, the empty string in package_dir stands for the current directory.)"

because there is no package_dir option in the example.

<------------ Preceding Text ------------>
  ...

If you have sub-packages, they must be explicitly listed in packages, but any entries in package_dir automatically extend to sub-packages. (In other words, the Distutils does not scan your source tree, trying to figure out which directories correspond to Python packages by looking for __init__.py files.) Thus, if the default layout grows a sub-package:

<root>/
        setup.py
        foobar/
                 __init__.py
                 foo.py
                 bar.py
                 subfoo/
                           __init__.py
                           blah.py
then the corresponding setup script would be

from distutils.core import setup
setup(name='foobar',
      version='1.0',
      packages=['foobar', 'foobar.subfoo'],
      )

(Again, the empty string in package_dir stands for the current directory.)
History
Date User Action Args
2014-06-11 18:30:15Reid.Pricesetrecipients: + Reid.Price, docs@python
2014-06-11 18:30:15Reid.Pricesetmessageid: <1402511415.47.0.115494695808.issue21726@psf.upfronthosting.co.za>
2014-06-11 18:30:15Reid.Pricelinkissue21726 messages
2014-06-11 18:30:15Reid.Pricecreate