[Distutils] patch: ez_setup.py: separate default version and minimum version of setuptools

zooko zooko at zooko.com
Fri Sep 28 00:20:48 CEST 2007

> If you invoke 'use_setuptools("0.6c5")', you would get the same  
> behavior with an unpatched ez_setup.py.

That's true, but the oldest version of setuptools that we support is  
0.6a9, which comes with Ubuntu Dapper, but that one can't be  
downloaded from pypi.  Therefore there is no version number that we  
can give to the unpatched ez_setup.py that will both allow our dapper  
users to run "./setup.py install" and allow users without setuptools  
to get it automatically installed when they run "./setup.py install".

With our patch we can specify the required minimum version of  
setuptools (v0.6a9) separately from the default version of setuptools  
(v0.6c7), so that users who have setuptools can carry on as usual,  
and users who don't have setuptools at all get the latest version.

Now, since we are using our patch we have solved this problem for our  
users.  However, since the packages that we depend on don't use this  
patch, we sometimes run into the same problem.  Our product --  
"tahoe" -- uses simplejson, and we have a policy of managing source  
tarballs instead of a set of binary packages, so when we tell  
setuptools that tahoe depends on simplejson, then setuptools  
evaluates simplejson's setup.py, and then stops the build saying that  
simplejson requires setuptools >= v0.6c5.  Our current solution to  
this is to ask our users to manually install simplejson.  I'm hoping  
that a patch like the one we're offering will become widespread so  
that our users can get dependencies like simplejson packaged  

The other patch that I'm working on -- the attempt to detect  
setuptools version without importing setuptools -- is intended to  
solve a different problem that we have been faced with.  That is:  
what happens when the version of setuptools that is already installed  
on the user's machine is too old -- it is known not to work -- and  
the user has executed "./setup.py install"?

By the way, in my earlier references to pages about how we use  
setuptools, I forgot to include our packaging policy page:


Thank you for your time,


More information about the Distutils-SIG mailing list