|
20 | 20 |
|
21 | 21 | _INSTALL_SCHEMES = { |
22 | 22 | 'posix_prefix': { |
23 | | - 'stdlib': '{installed_base}/lib/python{py_version_short}', |
24 | | - 'platstdlib': '{platbase}/lib/python{py_version_short}', |
25 | | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', |
26 | | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', |
| 23 | + 'stdlib': '{installed_base}/lib/{implementation_lower}{py_version_short}', |
| 24 | + 'platstdlib': '{platbase}/lib/{implementation_lower}{py_version_short}', |
| 25 | + 'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages', |
| 26 | + 'platlib': '{platbase}/lib/{implementation_lower}{py_version_short}/site-packages', |
27 | 27 | 'include': |
28 | | - '{installed_base}/include/python{py_version_short}{abiflags}', |
| 28 | + '{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}', |
29 | 29 | 'platinclude': |
30 | | - '{installed_platbase}/include/python{py_version_short}{abiflags}', |
| 30 | + '{installed_platbase}/include/{implementation_lower}{py_version_short}{abiflags}', |
31 | 31 | 'scripts': '{base}/bin', |
32 | 32 | 'data': '{base}', |
33 | 33 | }, |
34 | 34 | 'posix_home': { |
35 | | - 'stdlib': '{installed_base}/lib/python', |
36 | | - 'platstdlib': '{base}/lib/python', |
37 | | - 'purelib': '{base}/lib/python', |
38 | | - 'platlib': '{base}/lib/python', |
39 | | - 'include': '{installed_base}/include/python', |
40 | | - 'platinclude': '{installed_base}/include/python', |
| 35 | + 'stdlib': '{installed_base}/lib/{implementation_lower}', |
| 36 | + 'platstdlib': '{base}/lib/{implementation_lower}', |
| 37 | + 'purelib': '{base}/lib/{implementation_lower}', |
| 38 | + 'platlib': '{base}/lib/{implementation_lower}', |
| 39 | + 'include': '{installed_base}/include/{implementation_lower}', |
| 40 | + 'platinclude': '{installed_base}/include/{implementation_lower}', |
41 | 41 | 'scripts': '{base}/bin', |
42 | 42 | 'data': '{base}', |
43 | 43 | }, |
|
52 | 52 | 'data': '{base}', |
53 | 53 | }, |
54 | 54 | 'nt_user': { |
55 | | - 'stdlib': '{userbase}/Python{py_version_nodot}', |
56 | | - 'platstdlib': '{userbase}/Python{py_version_nodot}', |
57 | | - 'purelib': '{userbase}/Python{py_version_nodot}/site-packages', |
58 | | - 'platlib': '{userbase}/Python{py_version_nodot}/site-packages', |
59 | | - 'include': '{userbase}/Python{py_version_nodot}/Include', |
| 55 | + 'stdlib': '{userbase}/{implementation}{py_version_nodot}', |
| 56 | + 'platstdlib': '{userbase}/{implementation}{py_version_nodot}', |
| 57 | + 'purelib': '{userbase}/{implementation}{py_version_nodot}/site-packages', |
| 58 | + 'platlib': '{userbase}/{implementation}{py_version_nodot}/site-packages', |
| 59 | + 'include': '{userbase}/{implementation}{py_version_nodot}/Include', |
60 | 60 | 'scripts': '{userbase}/Scripts', |
61 | 61 | 'data': '{userbase}', |
62 | 62 | }, |
63 | 63 | 'posix_user': { |
64 | | - 'stdlib': '{userbase}/lib/python{py_version_short}', |
65 | | - 'platstdlib': '{userbase}/lib/python{py_version_short}', |
66 | | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', |
67 | | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', |
68 | | - 'include': '{userbase}/include/python{py_version_short}', |
| 64 | + 'stdlib': '{userbase}/lib/{implementation_lower}{py_version_short}', |
| 65 | + 'platstdlib': '{userbase}/lib/{implementation_lower}{py_version_short}', |
| 66 | + 'purelib': '{userbase}/lib/{implementation_lower}{py_version_short}/site-packages', |
| 67 | + 'platlib': '{userbase}/lib/{implementation_lower}{py_version_short}/site-packages', |
| 68 | + 'include': '{userbase}/include/{implementation_lower}{py_version_short}', |
69 | 69 | 'scripts': '{userbase}/bin', |
70 | 70 | 'data': '{userbase}', |
71 | 71 | }, |
72 | 72 | 'osx_framework_user': { |
73 | | - 'stdlib': '{userbase}/lib/python', |
74 | | - 'platstdlib': '{userbase}/lib/python', |
75 | | - 'purelib': '{userbase}/lib/python/site-packages', |
76 | | - 'platlib': '{userbase}/lib/python/site-packages', |
| 73 | + 'stdlib': '{userbase}/lib/{implementation_lower}', |
| 74 | + 'platstdlib': '{userbase}/lib/{implementation_lower}', |
| 75 | + 'purelib': '{userbase}/lib/{implementation_lower}/site-packages', |
| 76 | + 'platlib': '{userbase}/lib/{implementation_lower}/site-packages', |
77 | 77 | 'include': '{userbase}/include', |
78 | 78 | 'scripts': '{userbase}/bin', |
79 | 79 | 'data': '{userbase}', |
|
95 | 95 | _CONFIG_VARS = None |
96 | 96 | _USER_BASE = None |
97 | 97 |
|
| 98 | +def _get_implementation(): |
| 99 | + if sys.implementation.name == 'ironpython': |
| 100 | + return 'IronPython' |
| 101 | + return 'Python' |
98 | 102 |
|
99 | 103 | def _safe_realpath(path): |
100 | 104 | try: |
@@ -531,6 +535,8 @@ def get_config_vars(*args): |
531 | 535 | except AttributeError: |
532 | 536 | # sys.abiflags may not be defined on all platforms. |
533 | 537 | _CONFIG_VARS['abiflags'] = '' |
| 538 | + _CONFIG_VARS['implementation'] = _get_implementation() |
| 539 | + _CONFIG_VARS['implementation_lower'] = _get_implementation().lower() |
534 | 540 |
|
535 | 541 | if os.name == 'nt': |
536 | 542 | _init_non_posix(_CONFIG_VARS) |
|
0 commit comments