[Distutils] include special filetypes and subdirectories
pje at telecommunity.com
Fri Feb 19 02:04:30 CET 2010
At 01:34 AM 2/19/2010 +0100, Assem Chelli wrote:
>how to change setup.py to include special filetypes and subdirectories
>recursively in python eggs
Option 1: Put them under revision control using CVS, Subversion, or
any revision control system that has a setuptools plugin (in which
case, you'll need the plugin installed in your development
environment). Then, add 'include_package_data=True' in your setup() call.
Option 2: Use the package_data setup() argument (see the distutils
docs), and explicitly list the files and directories to
include. This is not recursive, but will also work with plain distutils.
Option 3: Use a MANIFEST.in file (see the distutils docs) and specify
the directories to include, and also place
'include_package_data=True' in your setup() call.
Of these, option 1 is generally the "best" option since it doesn't
require you to maintain information in two or more places; the files
are included as a side effect of your ordinary development practices,
as long as you're using a revision control system.
More information about the Distutils-SIG