]>
Commit | Line | Data |
---|---|---|
b10abc3a AM |
1 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py |
2 | --- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-19 13:31:44.000000000 +0100 | |
3 | +++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:40:00.705652346 +0100 | |
4 | @@ -29,14 +29,14 @@ WINDOWS_SCHEME = { | |
ea93f05f | 5 | |
e684db95 AM |
6 | INSTALL_SCHEMES = { |
7 | 'unix_prefix': { | |
ea93f05f | 8 | - 'purelib': '$base/lib/python$py_version_short/site-packages', |
520f15b4 AM |
9 | + 'purelib': '$base/$platlibdir/python$py_version_short/site-packages', |
10 | 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', | |
e3852288 | 11 | 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', |
e684db95 AM |
12 | 'scripts': '$base/bin', |
13 | 'data' : '$base', | |
14 | }, | |
15 | 'unix_home': { | |
ea93f05f | 16 | - 'purelib': '$base/lib/python', |
520f15b4 AM |
17 | + 'purelib': '$base/$platlibdir/python', |
18 | 'platlib': '$base/$platlibdir/python', | |
e684db95 AM |
19 | 'headers': '$base/include/python/$dist_name', |
20 | 'scripts': '$base/bin', | |
b10abc3a AM |
21 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py |
22 | --- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 | |
23 | +++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 | |
520f15b4 | 24 | @@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan |
ea93f05f | 25 | prefix = plat_specific and EXEC_PREFIX or PREFIX |
e684db95 AM |
26 | |
27 | if os.name == "posix": | |
520f15b4 | 28 | - if plat_specific or standard_lib: |
49e8feb6 | 29 | + if plat_specific or standard_lib or prefix != "/usr": |
520f15b4 AM |
30 | # Platform-specific modules (any module from a non-pure-Python |
31 | # module distribution) or standard Python library modules. | |
32 | libdir = sys.platlibdir | |
e684db95 | 33 | else: |
520f15b4 AM |
34 | # Pure Python |
35 | - libdir = "lib" | |
36 | + libdir = "share" | |
37 | libpython = os.path.join(prefix, libdir, | |
38 | "python" + get_python_version()) | |
39 | if standard_lib: | |
b10abc3a AM |
40 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py |
41 | --- Python-3.9.2.org/Lib/distutils/tests/test_install.py 2021-02-19 13:31:44.000000000 +0100 | |
42 | +++ Python-3.9.2/Lib/distutils/tests/test_install.py 2021-02-25 18:40:00.705652346 +0100 | |
520f15b4 | 43 | @@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan |
ea93f05f | 44 | expected = os.path.normpath(expected) |
e684db95 AM |
45 | self.assertEqual(got, expected) |
46 | ||
ea93f05f | 47 | - libdir = os.path.join(destination, "lib", "python") |
520f15b4 | 48 | + libdir = os.path.join(destination, sys.platlibdir, "python") |
e684db95 | 49 | check_path(cmd.install_lib, libdir) |
b10abc3a AM |
50 | platlibdir = os.path.join(destination, sys.platlibdir, "python") |
51 | check_path(cmd.install_platlib, platlibdir) | |
52 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py | |
53 | --- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100 | |
54 | +++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 | |
520f15b4 AM |
55 | @@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): |
56 | "python%d.%d" % sys.version_info[:2], | |
57 | "site-packages") | |
58 | sitepackages.append(path) | |
59 | + sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) | |
ea93f05f | 60 | + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) |
04df829f | 61 | else: |
e3852288 | 62 | sitepackages.append(prefix) |
75257062 | 63 | |
b10abc3a AM |
64 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py |
65 | --- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 | |
66 | +++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 | |
67 | @@ -27,7 +27,7 @@ _INSTALL_SCHEMES = { | |
75257062 | 68 | 'posix_prefix': { |
520f15b4 AM |
69 | 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', |
70 | 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', | |
ea93f05f | 71 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', |
520f15b4 AM |
72 | + 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', |
73 | 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', | |
75257062 | 74 | 'include': |
b88f500a | 75 | '{installed_base}/include/python{py_version_short}{abiflags}', |
b10abc3a | 76 | @@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { |
75257062 | 77 | 'data': '{base}', |
78 | }, | |
79 | 'posix_home': { | |
b88f500a | 80 | - 'stdlib': '{installed_base}/lib/python', |
75257062 | 81 | - 'platstdlib': '{base}/lib/python', |
ea93f05f JK |
82 | - 'purelib': '{base}/lib/python', |
83 | - 'platlib': '{base}/lib/python', | |
520f15b4 AM |
84 | + 'stdlib': '{installed_base}/{platlibdir}/python', |
85 | + 'platstdlib': '{base}/{platlibdir}/python', | |
86 | + 'purelib': '{base}/{platlibdir}/python', | |
87 | + 'platlib': '{base}/{platlibdir}/python', | |
b88f500a AM |
88 | 'include': '{installed_base}/include/python', |
89 | 'platinclude': '{installed_base}/include/python', | |
75257062 | 90 | 'scripts': '{base}/bin', |
b10abc3a | 91 | @@ -69,7 +69,7 @@ _INSTALL_SCHEMES = { |
c7fcbc4e | 92 | 'posix_user': { |
520f15b4 AM |
93 | 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', |
94 | 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', | |
c7fcbc4e | 95 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', |
520f15b4 AM |
96 | + 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', |
97 | 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', | |
c7fcbc4e JK |
98 | 'include': '{userbase}/include/python{py_version_short}', |
99 | 'scripts': '{userbase}/bin', | |
b10abc3a | 100 | @@ -490,7 +490,11 @@ def get_config_h_filename(): |
a033b415 JK |
101 | else: |
102 | inc_dir = _sys_home or _PROJECT_BASE | |
103 | else: | |
104 | - inc_dir = get_path('platinclude') | |
105 | + if hasattr(sys, 'abiflags'): | |
106 | + config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags) | |
107 | + else: | |
108 | + config_dir_name = 'config' | |
109 | + inc_dir = os.path.join(get_path('stdlib'), config_dir_name) | |
110 | return os.path.join(inc_dir, 'pyconfig.h') | |
111 | ||
112 | ||
b10abc3a AM |
113 | diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in |
114 | --- Python-3.9.2.org/Makefile.pre.in 2021-02-19 13:31:44.000000000 +0100 | |
115 | +++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:40:00.705652346 +0100 | |
116 | @@ -1634,9 +1634,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf | |
514c1496 AM |
117 | @if test -d $(LIBRARY); then :; else \ |
118 | if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ | |
ea93f05f | 119 | if test "$(SHLIB_SUFFIX)" = .dll; then \ |
514c1496 AM |
120 | - $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ |
121 | + $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \ | |
ea93f05f JK |
122 | else \ |
123 | - $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ | |
ea93f05f | 124 | + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ |
ea93f05f JK |
125 | fi; \ |
126 | else \ | |
127 | echo Skip install of $(LIBRARY) - use make frameworkinstall; \ | |
b10abc3a AM |
128 | diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py |
129 | --- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100 | |
130 | +++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100 | |
131 | @@ -750,7 +750,7 @@ class PyBuildExt(build_ext): | |
380ee8da AM |
132 | add_dir_to_list(self.compiler.include_dirs, |
133 | sysconfig.get_config_var("INCLUDEDIR")) | |
134 | ||
135 | - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] | |
520f15b4 | 136 | + system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir] |
380ee8da AM |
137 | system_include_dirs = ['/usr/include'] |
138 | # lib_dirs and inc_dirs are used to search for files; | |
139 | # if a file is found in one of those directories, it can | |
b10abc3a | 140 | @@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext): |
e3852288 JB |
141 | elif curses_library: |
142 | readline_libs.append(curses_library) | |
3e35963a | 143 | elif self.compiler.find_library_file(self.lib_dirs + |
e3852288 | 144 | - ['/usr/lib/termcap'], |
520f15b4 | 145 | + ['/usr/' + sys.platlibdir + '/termcap'], |
e3852288 | 146 | 'termcap'): |
e684db95 | 147 | readline_libs.append('termcap') |
3e35963a AM |
148 | self.add(Extension('readline', ['readline.c'], |
149 | - library_dirs=['/usr/lib/termcap'], | |
520f15b4 | 150 | + library_dirs=['/usr/' + sys.platlibdir + '/termcap'], |
3e35963a AM |
151 | extra_link_args=readline_extra_link_args, |
152 | libraries=readline_libs)) | |
e3852288 | 153 | else: |