[Python-Dev] Python install layout and the PATH on win32

VanL van.lindberg at gmail.com
Wed Mar 14 16:48:58 CET 2012


On 3/14/2012 9:53 AM, Jim J. Jewett wrote:
> In view-source:http://mail.python.org/pipermail/python-dev/2012-March/117586.html
> van.lindberg at gmail.com posted:
>
>>>> 1) The layout for the python root directory for all platforms should be
>>>> as follows:
>
>>>> stdlib = {base/userbase}/lib/python{py_version_short}
>>>> platstdlib = {base/userbase}/lib/python{py_version_short}
>>>> purelib = {base/userbase}/lib/python{py_version_short}/site-packages
>>>> platlib = {base/userbase}/lib/python{py_version_short}/site-packages
>>>> include = {base/userbase}/include/python{py_version_short}
>>>> scripts = {base/userbase}/bin
>>>> data = {base/userbase}
>
> Why?
>
> Pure python vs compiled C doesn't need to be separated at the directory
> level, except for cleanliness.


I am deliberately being cautious here. I actually agree with you. I am 
only suggesting we maintain all of these different distinctions because 
that is what we have already.

You can see what we have currently at 
http://hg.python.org/distutils2/file/2cec52b682a9/distutils2/_backport/sysconfig.cfg

I am *not* suggesting that docs, etc change at all - that is included in 
a different part of the configuration and is not modified by what I 
propose here (lines 1-26).

As noted earlier in the thread, I also change my proposal to maintain 
the existing differences between system installs and user installs.

Thus, the only place I am proposing changing are the values for the keys 
listed above. Specifically, this (lines 57-65 in the file above):

[nt]
stdlib = {base}/Lib
platstdlib = {base}/Lib
purelib = {base}/Lib/site-packages
platlib = {base}/Lib/site-packages
include = {base}/Include
platinclude = {base}/Include
scripts = {base}/Scripts
data = {base}

Would become this:

[nt]
stdlib = {base}/lib
platstdlib = {base}/lib
purelib = {base}/lib/site-packages
platlib = {base}/lib/site-packages
include = {base}/include
platinclude = {base}/include
scripts = {base}/bin
data = {base}

and this (lines 86-93):

[nt_user]
stdlib = {userbase}/Python{py_version_nodot}
platstdlib = {userbase}/Python{py_version_nodot}
purelib = {userbase}/Python{py_version_nodot}/site-packages
platlib = {userbase}/Python{py_version_nodot}/site-packages
include = {userbase}/Python{py_version_nodot}/Include
scripts = {userbase}/Scripts
data = {userbase}

would become this:

[nt_user]
stdlib = {userbase}/python{py_version_short}
platstdlib = {userbase}/python{py_version_short}
purelib = {userbase}/python{py_version_nodot}/site-packages
platlib = {userbase}/python{py_version_nodot}/site-packages
include = {userbase}/python{py_version_nodot}/include
scripts = {userbase}/bin
data = {userbase}


> ... if you're rewriting that logic, you're just asking for bugs on a
> strange platform that you don't use.

I am not rewriting the logic - the logic is driven by these 
configuration values. And this is a platform I use, and that is why this 
drives me crazy!


> Subdirectories are:

You forgot one:

C:\python32\Scripts
Would change to C:\python32\bin. The python binary and scripts meant to 
be run direction (easy_install, etc) would all go in this directory.

> C:\python32\DLLs
Would not change.

> C:\python32\Doc
Would not change.

> C:\python32\include
Would be specified as lower case only - but otherwise would not change.


> C:\python32\Lib
Would be specified as lower case only - but otherwise would not change.

> C:\python32\libs
Would not change.

> C:\python32\tcl
Would not change.

> C:\python32\Tools
This proposal does not change this, although I do think that this could 
be eliminated or made into "examples".

Thanks,
Van




More information about the Python-Dev mailing list