[Distutils] Non-typical scenario

Peter Bienstman pbienst@MIT.EDU
Mon Apr 8 17:22:08 2002


I'm trying to write a setup.py, but I'm having a few problems because of
the following a-typical requirements:

1) I want all my extension modules ('e.so'), python scripts ('s1.py',
's2.py') and data files in a separate directory 'MyProject' under
site-packages, but I want them to be available from the root package, so
that I can type 'from e import *', rather than 'from MyProject.e import
*'. Is there any way to do this with distutils?

2) the development versions of s1.py and s2.py live in completely
different directories, but I still want distutils to copy them over to
the same 'MyProject' directory, where they would be avaible from the
root package. I haven't found a way to do this.

3) using data_files = [("MyProjects"), ...] copies the data files over
to /usr/local/MyProjects, however, I want them to end up in
/usr/local/lib/python-x.x/site-packages/MyProjects, where all my other
stuff lives. If I have to explicitly specify a Python version number, my
code won't be portable. 

Thanks for any help you can provide.

Kind regards,

Peter