[Distutils] Including directories in .eggs?

Phillip J. Eby pje at telecommunity.com
Fri Feb 15 23:17:48 CET 2008


At 03:44 PM 2/15/2008 -0500, David Wolever wrote:
>Hey,
>I'm wondering how I would go about including an entire directory in
>the .egg setup.py creates.  We are using Dojo, and it automatically
>builds a directory containing the "stuff" it needs... But just
>including that directory in package_data doesn't work (as it expects
>to copy a file, not a directory).  Including a glob such as 'js/**/
>**' also fails, because directories are listed as part of the '**/
>**', and it can't copy those.

Use 'include_package_data=True', and put the files under revision control.

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.



More information about the Distutils-SIG mailing list