diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-02-03 16:10:34 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-02-03 16:10:34 (GMT) |
commit | 63187670ef91ab764047be7b0fd409e12d739598 (patch) | |
tree | f24fb0a79a12baa87ee2ccd0fcf38c71d26efe5b /Lib/distutils | |
parent | b0869407de1cd32cc8e0649d57638ca60d57f024 (diff) | |
download | cpython-63187670ef91ab764047be7b0fd409e12d739598.zip cpython-63187670ef91ab764047be7b0fd409e12d739598.tar.gz cpython-63187670ef91ab764047be7b0fd409e12d739598.tar.bz2 |
Merged revisions 77949 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77949 | tarek.ziade | 2010-02-03 16:38:12 +0100 (Wed, 03 Feb 2010) | 1 line
leaving global attributes for backward compat
........
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/install.py | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 2a6d4dd..cfebeea 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -17,6 +17,87 @@ from distutils.file_util import write_file from distutils.util import convert_path, change_root, get_platform from distutils.errors import DistutilsOptionError +# kept for backward compat, will be removed in 3.2 +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', + 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', + 'platlib': '$base/lib/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'nt': WINDOWS_SCHEME, + 'nt_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + }, + 'mac': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'mac_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'os2': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'os2_home': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + } + +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') +# end of backward compat + def _subst_vars(s, local_vars): try: return s.format(**local_vars) |