distutils question

billiejoex gnewsg at gmail.com
Tue Sep 11 03:30:59 CEST 2007


Hi there,
I'm having problems with creating an installer for a module of mine by
using distutils. I'll try to explain my problem as clear as I can
(sorry but English is not my first language).
This is the structure of my module:

--------------------------------
setup.py
mypackage/
    __init__.py
    module.py
demo/
    script.py
    test/
         test_script.py
test
     test_module.py
--------------------------------

By using distutils in such way a 'mypackage' directory within
'module.py' is created in python's 'site-packages' directory:

from distutils.core import setup
setup(
    ...
    packages = ['mypackage'],
)


The problem is that I can't find a way for including "demo" and "test"
directories (along with files contained in them) into "site-packages/
mypackage" directory.
The only way I found is *moving* 'demo' and 'test' directories into
'mypackage' but I would want to avoid that, if possible.

Could someone point me in the right direction? I passed the entire
night without finding a clue...




More information about the Python-list mailing list