don't know if this is useful, but setuptools is a plug-in replacement for distutils that makes this kind of thing easier (i think).
http://peak.telecommunity.com/DevCenter/setuptools andrew TP wrote: > Hi everybody, > > I have programmed a python package, and I would like to use distutils with > it. My package has the following structure after doing sdist and build: > > $ python setup.py sdist > [...] > $ python setup.py build > [...] > $ tree > . > |-- MANIFEST > |-- MANIFEST.in > |-- README > |-- build > | `-- lib > | `-- utils > | |-- __init__.py > | `-- __init__.pyc > |-- dist > | `-- utils-1.0.tar.gz > |-- utils > | |-- __init__.py > | |-- __init__.pyc > | |-- utils_1 > | | |-- __init__.py > | | |-- __init__.pyc > | | `-- toto.py > | `-- utils2 > | |-- __init__.py > | `-- foo.py > `-- setup.py > > So, in the "build" directory, I do not get all the the modules ("utils1" > and "utils2" directory), but only the first level of the package (files > under "utils" directory). Whereas all the files are included in the > utils-1.0.tar.gz archive made with "sdist". > How to modify setup.py and/or MANIFEST.in to include all the > subdirectories > in the "build" directory when doing "setup.py build"? I have googled a bit > without finding anything. > These are my MANIFEST.in and setup.py files: > > $ cat MANIFEST.in > include README > recursive-include utils *.py > > $ cat setup.py > from distutils.core import setup > > setup( name = 'utils' > , version = '1.0' > , url = '' > , author = '' > , author_email = '' > , packages = [ 'utils' ] ) > > Thanks in advance > > -- > python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\ > 9&1+,\'Z4(55l4('])" > > "When a distinguished but elderly scientist states that something is > possible, he is almost certainly right. When he states that something is > impossible, he is very probably wrong." (first law of AC Clarke) > -- > http://mail.python.org/mailman/listinfo/python-list > > -- http://mail.python.org/mailman/listinfo/python-list