[Python-Dev] Re: [Distutils] Questions about distutils strategy

Gordon McMillan gmcm@hypernet.com
Thu, 9 Dec 1999 09:17:27 -0500


[Guido]
> > It's not Mark's fault, it's Microsoft's fault.  If you don't do
> > things the way MS wants you to, experienced Windows users will
> > gripe, misunderstand what you do, etc.
[Tim] 
> Something just occurred to me:  MS's guidelines aren't arbitrary,
> they actually have very good reasons.  In the case of putting all
> an app's crucial info in the Registry, it's the only way to allow
> a site administrator to set policy and site options remotely (an
> admin can fiddle other machines' registries remotely).  This
> works very well indeed when there's only "one copy" of an app on
> a machine (or at most one copy "per user").

And actually, the business about separate subtrees for the 
machine's configuration and the user's configuration is pretty 
clever. MS doesn't explain it well, and it gets misused, but 
when done right, it's a lot simpler than the maze of .xxxrc files 
you sometimes find in other OSes.
 
> What just occurred to me is that JimA is concerned with *not*
> letting any info from a previously-installed Python affect the
> app he's installing. Similarly, Gordon's Win32 "standalone
> installer" modifies python.exe and pythonw.exe to use a
> PYTHONPATH he forces, leaving the registry out of it. Similarly,
> the woes I've had in trying to sell Python as a general Win32
> scripting tool at work mostly boil down to that there's no
> effortless way to do it that doesn't risk picking up info from--
> or forcing info onto --pre-existing or future distinct Python
> installations (in contrast, Perl "just works" in this respect).

In my Linux version, I went to the heart of the matter - 
getpath.c. It occurs to me that getpath.c might do better to 
follow a normal bootstrap process - ie,  create the absolute 
minimal sys.path required to go to the next step. Then the 
rest of what goes on in getpath.c could be written in Python. 
Maybe that Python code needs to get frozen in (to prevent 
bozos from destroying an installation by stepping on 
getpath.py), but it would make it a lot easier to create 
independent installations, and also reduce the variations 
between platforms at the C level. (Then again, I've never heard 
of anyone stepping on exceptions.py.)

If some registry manipulation primitives were exposed (say, 
through ntpath) that would mean that Windows developers 
could (if they wanted) play by the MS rules with at least the 
option of not stepping on each other.
 


- Gordon