[Distutils] Make ez_setup.py/easy_install $PATH aware

Phillip J. Eby pje at telecommunity.com
Sun Sep 17 16:52:07 CEST 2006


At 02:38 PM 9/17/2006 +0100, Paul Moore wrote:
>BTW, if you really want to make easy_install.exe available on the
>command line without needing a PATH entry, you can do what python.exe
>does: create a registry key
>
>HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\easy_install.exe
>
>with a single default value of the full pathname for the executable.
>Then you don't need to muck with the user's PATH at all. For more
>details, search for "App Paths" in the platform SDK - it gives the
>full details.

Unfortunately, the details it gives are wrong.  Neither cmd.exe, 
command.com, nor bash will find a program registered this way, at least on 
my Win2K PC.  This appears to *only* work for the Start/Run menu.  Which 
isn't a bad start; I imagine that setuptools "GUI scripts" should be 
installed this way on Windows until/unless we get a way to give them menu 
entries or icons.

A little further investigation reveals that typing "start whatever" in a 
command window will let you run something that's in "App Paths", *but* it 
will start in its own window, even if it's a console application.  :(

So, for console scripts, this still leaves something to be desired.

As far as I can tell, *despite* what the MSDN docs say about App Paths, it 
is strictly a GUI facility and has no effect on command 
shells.  (Interestingly, the lower-level SDK's show why - CreateProcess() 
ignores app paths, and only ShellExecute takes it into account.  That's how 
I figured out that I could use the "start" command as well as the Start/Run 
menu option.)



More information about the Distutils-SIG mailing list