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