[Distutils] Setuptools should not depend on setuptools.

P.J. Eby pje at telecommunity.com
Thu Mar 12 19:02:31 CET 2009


At 06:20 PM 3/12/2009 +0100, Lennart Regebro wrote:
>I don't have many assumptions. I just want the setuptools install and
>tests to work as expected under both python2 and python3.  And that
>means that python3.0 setup.py install should work. And python3.0
>setup.py test would be nice too, although it's less important.

In which case, either separate source distros are required, or 2to3 
will need to be present, and the main setup.py will need to detect 
python3 and run 2to3 on itself, then execfile the setup script of the 
newly-generated, python3 version of the same package.

Please note that even if you make setuptools "not depend on itself", 
all you are really doing is *moving* this problem to a different 
level.  Whatever it is that it depends on, will still need to be 
duplicated for python2 and python3...  and what's more, having a way 
worked out to do this will be of benefit to other packages besides 
setuptools, especially if setuptools provides some native support for 
the feature.  (Like a standardized "setup.py" and "setup3.py" that 
delegate to the user's original 'setup2.py'.)



More information about the Distutils-SIG mailing list