[Distutils] Make ez_setup.py/easy_install $PATH aware
Phillip J. Eby
pje at telecommunity.com
Sun Sep 17 03:38:33 CEST 2006
At 06:04 PM 9/16/2006 -0700, Ben Bangert wrote:
>This is hopefully a pretty minor fix, and now that I think about it,
>I'm surprised it hasn't been in setuptools for ages. Some platforms
>don't have something setup right so that Python scripts are installed
>deep into Python library directories that definitely aren't in the
>It becomes embarrassing as one tries to write "Install" instructions,
>and has to keep including a "Do you have any idea where the XXX
>command is? Try finding it and adding that dir to your path". Or
>having to tell people not to do anything without making a
>~/.pydistutils.cfg file with a install-dir location.
>So.... couldn't ez_setup.py look at the $PATH present, and notice
>when the install location is outside of it?
Excellent suggestion, let's add it in 0.7. Patches are of course welcome,
or I can just get to it when I get to it. It also needs an option to say
"go ahead anyway, I know what I'm doing", or else Jim Fulton will be
>Then it could either give
>a nice big warning about how the scripts its about to install aren't
>going to be available without re-installing with the package and
>defining a install-dir for scripts, or adding the path to your $PATH.
>Surely there ought to be a better solution than blindly copying
>scripts into locations that will leave users wondering why they can't
>be run, and it seems like the system for that should be in
>ez_setup.py as thats a first step to getting the whole setuptools/
>easy_install system going.
By the way, it's easy_install that we actually need to worry about, not
ez_setup. ez_setup's only job is to download and run easy_install, which
then handles everything from there. So both issues can be handled that way.
Windows is probably the main offender, here, however, and I'm not sure
there's really a good solution there. I don't think there's a standard
$PATH directory that really makes sense for all circumstances, to name just
one issue. So, suggestions on what should happen there would be helpful.
More information about the Distutils-SIG