It turned out that Fabric is the right way!
automated build of python eggs
-
31-05-2022 - |
题
I have a directory containing N
subdirectories each of which contains setup.py
file. I want to write a python script that iterates through all subdirectories, issues python setup.py bdist_egg --dist-dir=somedir
, and finally removes build
and *.egg-info
from each subdirectory and I have two questions:
- Can I invoke
bdist_egg
without usingos.system
? Some python interface would be nicer. - Can I tell
bdist_egg
not to generatebuild
and*.egg-info
or is there any complementary command forsetup.py
that cleans this for me?
解决方案 2
其他提示
- I would use
subprocess
. I believesetup.py
command line arguments should be your interface. - Check
setup.py clean --all
不隶属于 StackOverflow