[Distutils] --prefix and PYTHONPATH support added in SVN

Phillip J. Eby pje at telecommunity.com
Fri Feb 10 23:28:44 CET 2006


I've just checked in PYTHONPATH and --prefix support for 
ez_setup/easy_install that should "just work", so that the problems Joe 
Gregorio blogged about the other day can no longer occur.  That is, at the 
point where he tried to use "--prefix" the current SVN version should work, 
with everything going smoothly from there.  (I also fixed the distutils 
help message wart where it displays wrong usage info.)

If you'd like to give it a try, you can experiment with it using:

    svn co http://svn.python.org/projects/sandbox/trunk/setuptools
    cd setuptools
    python setup.py install --prefix=~

This should then give you a ~/bin/easy_install command that installs stuff 
to ~/lib/python2.X/site-packages, as long as you have that site-packages 
directory on your PYTHONPATH during the initial install and for future use.

And of course you can use other prefixes or --install-dir settings, as long 
as the target directory is on PYTHONPATH, and all the old ways of 
customizing installation locations should still work.  And you no longer 
need to put any eggs on PYTHONPATH manally, ever.

Anyway, I'd appreciate testers' feedback.  Please feel free to be brutal in 
your evaluations, because at this point I'm pushing for an 0.6b1 (yes, 
*beta*!) release by PyCon.

(By the way, for anybody wondering about the difference between ez_setup 
and easy_install, there really isn't one; ez_setup just downloads 
setuptools and runs easy_install in a bootstrap mode.  So all the 
enhancements I just made to easy_install will be in effect for ez_setup.py 
too, once the next official release (0.6a10) is out.)



More information about the Distutils-SIG mailing list