[Distutils] win32 default installation

Thomas Heller thomas.heller@ion-tof.com
Sat Sep 9 14:28:01 2000


> On 09 September 2000, Robin Becker said:
> > Is there any reason why the default directory for .pyds seems to be the
> > base python install dir rather than the DLLs directory underneath it? 
> 

[Greg]
> Because of this code in install.py:
> 
>   INSTALL_SCHEMES = {
>   ...
>       'nt': {
>           'purelib': '$base',
>           'platlib': '$base',
>           'headers': '$base\\Include\\$dist_name',
>           'scripts': '$base\\Scripts',
>           'data'   : '$base',
>           },
>   ...
>   }
> 
> Which is based on what I understood about Python-on-Windows after
> grilling Guido mercilessly for several hours one day last summer.  That
> is, third-party libraries -- modules and extensions both -- go straight
> to the <prefix> dir.  (It's spelled "base" here because the base library
> dir == prefix only on Windows and Mac OS; on Unix, "base" is
> <prefix>/lib/pythonX.Y.)
> 
One problem with this is the following (for modules/packages,
not only for .pyd extensions):
distutils (on windows), as supplied in python 1.6 and 2.0,
is installed in <prefix>\lib.
If I download a new distutils distribution and run 'setup.py install'
it will install the new version in <prefix>.
The default python path on windows is something like
['', '<prefix>\\DLLs', '<prefix>\\lib', '<prefix>\\libplat-win',
 '<prefix>\\lib\\lib-tk', '<prefix>'].
So the old version in '<prefix>\\lib', which should replace the old
version in '<prefix>', will be found first on the python-path,
which is clearly wrong.

What should we do here? Try to import the old package/module,
and use their __path__ as the destination directory?

Thomas