setup.py install dependency too?
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?
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.
精彩评论