0

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:

  1. Can I invoke bdist_egg without using os.system? Some python interface would be nicer.
  2. Can I tell bdist_egg not to generate build and *.egg-info or is there any complementary command for setup.py that cleans this for me?
mnowotka
  • 16,430
  • 18
  • 88
  • 134

2 Answers2

0
  1. I would use subprocess. I believe setup.py command line arguments should be your interface.
  2. Check setup.py clean --all
Pawel Furmaniak
  • 4,648
  • 3
  • 29
  • 33
0

It turned out that Fabric is the right way!

mnowotka
  • 16,430
  • 18
  • 88
  • 134