[Distutils] Make ez_setup.py/easy_install $PATH aware
Phillip J. Eby
pje at telecommunity.com
Sun Sep 17 18:37:16 CEST 2006
At 04:29 PM 9/17/2006 +0100, Paul Moore wrote:
>On 9/17/06, Phillip J. Eby <pje at telecommunity.com> wrote:
>>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
>[...]
>>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.
>[...]
>>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.)
>
>Sorry about that. I use 4NT, and it never occurred to me that CMD
>didn't do this as well. Does this mean that on a standard PC, with
>CMD.exe, typing "python" at he command prompt (with Python installed
>from the standard installer) doesn't work???!??
>
>[A quick test in VMWare later]
>
>Wow! It really doesn't! That seems, well, "less than ideal" :-( How
>does anyone live with that? I guess command-line Python users on
>Windows are used to needing to fix up PATH...
Interestingly, I find that you can create an App Paths entry for cmd.exe
that adds things to *its* path, but it only works if you start cmd using
the "start" command or Start/Run. It doesn't work if you invoke cmd from
another shell, nor does it help if you're using a different shell. Ugh.
I think getting a workable command-line environment on Windows without
end-user customization is an exercise in futility. :(
More information about the Distutils-SIG
mailing list