[Python-Dev] Distutils2 scripts

Tim Golden mail at timgolden.me.uk
Tue Oct 12 20:41:04 CEST 2010

On 12/10/2010 7:17 PM, R. David Murray wrote:
> On Tue, 12 Oct 2010 19:33:52 +0200, =?windows-1252?Q?=22Martin_v=2E_L=F6wis=22?=<martin at v.loewis.de>  wrote:
>>> So as well as pysetup.py/.exe I would like pysetup-3.2.py / .exe on
>>> Windows please. (I'd really like a python-3.2.exe as well.)
>> Please submit a patch to the installer, then.
>> I'm still skeptical about adding PATH, because
>> a) I find that fairly invasive, and despise long paths myself
>>     (it hurts my eyes to see the list of directories that VS adds to MY
>>     path)

Assume, for the sake of the argument, that we patched the
MSI so it (optionally) added the installing version of Python
(and, optionally ./scripts) to the PATH. What, then, do we
do with existing PATH entries which point to older/other Python
installations? Option (a) says: clear them
all out, because it's meaningless having more than one entry
with a python.exe on it and the one we want must be this one
because we've just ticked a box to say so. Option (b) says:
don't mess with other entries on the PATH; it's not done.

That said, the current installer switches an APPPATH entry and
changes -- optionally -- the file associations to point to
the installing version, so there is a precedent for ditching
previous data.

I'm actually +0 on the idea. An expert user who's trying to
juggle different Python versions should be able to sort
himself out. A naive user can use Start > Run > Python to
get the current version (thanks to the APPPATH) and can
use "program.py arg1 arg2" on the console to run program.py
with the associated version. (Notwithstanding the bug which
doesn't correctly redirect output via file associations)

But all this is pie in the sky until someone actually integrates
such a change to the MSI. Martin's clearly not going to since
he doesn't like the idea. I'm actually +0.5 on including a
script in tools\scripts (or wherever) which, when run, would
set as current the version of Python which ran it. I have a  roughly
working version of such a thing; the problem is getting it to
work with all the different Python versions and all the different
Windows versions we support.


More information about the Python-Dev mailing list