Patch #449054 to implement PEP 250. The standard install directory for
modules and extensions on Windows is now $PREFIX/Lib/site-packages. Includes backwards compatibility code for pre-2.2 Pythons. Contributed by Paul Moore.
This commit is contained in:
parent
971e0690c4
commit
f17efb93d9
|
@ -16,6 +16,23 @@ from distutils.util import convert_path, subst_vars, change_root
|
|||
from distutils.errors import DistutilsOptionError
|
||||
from glob import glob
|
||||
|
||||
if sys.version < "2.2":
|
||||
WINDOWS_SCHEME = {
|
||||
'purelib': '$base',
|
||||
'platlib': '$base',
|
||||
'headers': '$base/Include/$dist_name',
|
||||
'scripts': '$base/Scripts',
|
||||
'data' : '$base',
|
||||
}
|
||||
else:
|
||||
WINDOWS_SCHEME = {
|
||||
'purelib': '$base/Lib/site-packages',
|
||||
'platlib': '$base/Lib/site-packages',
|
||||
'headers': '$base/Include/$dist_name',
|
||||
'scripts': '$base/Scripts',
|
||||
'data' : '$base',
|
||||
}
|
||||
|
||||
INSTALL_SCHEMES = {
|
||||
'unix_prefix': {
|
||||
'purelib': '$base/lib/python$py_version_short/site-packages',
|
||||
|
@ -31,13 +48,7 @@ INSTALL_SCHEMES = {
|
|||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
},
|
||||
'nt': {
|
||||
'purelib': '$base',
|
||||
'platlib': '$base',
|
||||
'headers': '$base/Include/$dist_name',
|
||||
'scripts': '$base/Scripts',
|
||||
'data' : '$base',
|
||||
},
|
||||
'nt': WINDOWS_SCHEME,
|
||||
'mac': {
|
||||
'purelib': '$base/Lib/site-packages',
|
||||
'platlib': '$base/Lib/site-packages',
|
||||
|
|
|
@ -94,7 +94,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|||
if standard_lib:
|
||||
return os.path.join(prefix, "Lib")
|
||||
else:
|
||||
return prefix
|
||||
if sys.version < "2.2":
|
||||
return prefix
|
||||
else:
|
||||
return os.path.join(PREFIX, "Lib", "site-packages")
|
||||
|
||||
elif os.name == "mac":
|
||||
if plat_specific:
|
||||
|
|
Loading…
Reference in New Issue