views:

186

answers:

1

I have a python source distribution, and it depends on some other modules that I've also made. The directory tree looks like this.

I've written a setup.py file for one of those modules (pydirac225, for those of you who are following along at home), and I want to have that setup.py called from the main setup.py?

Another module dependency (pysoundtouch14) has a setup.py file, but the contents of it are basically pasted into the main setup.py script. It seems more modular to allow each of these components to specify how they are set up, and allow the main setup file to invoke their setup scripts individually. Is there a standard way to deal with this issue?

To recap: I have some code that depends on other modules: should the other module's setup code go in the main setup.py, or is there a way to have my code's setup.py invoke their setup.py files?

+1  A: 

code that depends on other modeules

if this means that you import the other module, your main setup.py should take care of the dependency and include all neccessary files.

Alternatively take a look at the include and or data_files parameter of setup.py


clarification: if your python scripts which should be bundled by your main setup.py import the extensions, then the extensions are automatically included in the bundled package.

RSabet
@RSabet: you mean importing that module in my setup.py file? Or something else?
Jason Sundram
So, what I ended up doing was just including the code from the other setup.py files in my main setup.py. Nothing nice or elegant.
Jason Sundram