[Distutils] Including directories in .eggs?

Phillip J. Eby pje at telecommunity.com
Sat Feb 16 00:58:34 CET 2008


At 06:26 PM 2/15/2008 -0500, David Wolever wrote:
>On 15-Feb-08, at 5:17 PM, Phillip J. Eby wrote:
>>If that doesn't work, you're not using revision control, or just
>>don't want to put them in revision control, you'll have to list the
>>directory in a MANIFEST.in file: see the distutils docs
>>("Distributing Python Modules") from python.org for the specific
>>format.
>Alright, I've put in my MANIFEST.in file:
>recursive-include path/to/dojo/*
>
>But when I run ``python setup.py install`` the files don't appear in
>the egg that is installed to .../site-packages/
>
>The SOURCES.txt file DOES have the correct list of files, though, and
>when I use ``setup.py sdist`` the correct files are included there too.

Did you set 'include_package_data=True' in your setup?  Without that, 
setuptools doesn't know you want those files to be installed, vs. 
just shipping with your source distribution.


>Is there some subtle difference between an "install" and an "sdist"
>that I'm missing?

Yes: source distributions can include lots of stuff you don't intend 
to install, such as readme files, tests, documentation, samples, 
etc.  Eggs only contain the bits marked as needing to be installed 
with the actual library. 



More information about the Distutils-SIG mailing list