
At 06:30 PM 4/20/2009 +0200, Lennart Regebro wrote:
Because that's the one that generates the metadata setuptools needs to run, test itself, etc.
No, setup3.py does that.
I thought you couldn't import setuptools in setup3.py, for all the reasons you just described?
Why do I need setup.py?
To define the core entry points, basically. These are really bootstrapped from the existing entry_points.txt (which is why it's in SVN), but they need to be regenerated at egg_info/bdist_egg/install time to match the current Python version.
Apart from that, I believe setuptools only uses itself for finding its own packages (including data) and manifest building (i.e. finding files that are under SVN control).
So I suppose that if you dropped the use of find_packages(), you could make a setup.py that would let you run distutils commands on the code base, I just don't see how you'd get any setuptools-level commands to work properly without setuptools being imported first.
i.e., you could probably manage having one setup.py, or two setup.py's whose only difference is whether they import setuptools and use find_packages; like a setup3.py that does distutils, and a regular setup.py that imports setuptools and then execfiles setup3.py.
None of this makes setuptools any less reliant on itself for testing and building, though, since the core entry points have to exist in order for commands to be found, options to be verified, etc.