]> git.pld-linux.org Git - packages/python3.git/blob - python3-multilib.patch
- strict expat dep due to:
[packages/python3.git] / python3-multilib.patch
1 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
2 --- Python-3.9.2.org/Lib/site.py        2021-02-19 13:31:44.000000000 +0100
3 +++ Python-3.9.2/Lib/site.py    2021-02-25 18:40:00.705652346 +0100
4 @@ -295,7 +295,7 @@
5      if sys.platform == 'darwin' and sys._framework:
6          return f'{userbase}/lib/python/site-packages'
7  
8 -    return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages'
9 +    return f'{userbase}/{sys.platlibdir}/python{version[0]}.{version[1]}/site-packages'
10  
11  
12  def getuserbase():
13 @@ -371,6 +371,8 @@ def getsitepackages(prefixes=None):
14                                      "python%d.%d" % sys.version_info[:2],
15                                      "site-packages")
16                  sitepackages.append(path)
17 +            sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python"))
18 +            sitepackages.append(os.path.join(prefix, "share", "python%d.%d" % sys.version_info[:2], "site-packages"))
19          else:
20              sitepackages.append(prefix)
21              sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
22 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py
23 --- Python-3.9.2.org/Lib/sysconfig.py   2021-02-19 13:31:44.000000000 +0100
24 +++ Python-3.9.2/Lib/sysconfig.py       2021-02-25 18:40:00.705652346 +0100
25 @@ -27,7 +27,7 @@
26      'posix_prefix': {
27          'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
28          'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
29 -        'purelib': '{base}/lib/python{py_version_short}/site-packages',
30 +        'purelib': '{base}/share/python{py_version_short}/site-packages',
31          'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
32          'include':
33              '{installed_base}/include/python{py_version_short}{abiflags}',
34 @@ -37,10 +37,10 @@ _INSTALL_SCHEMES = {
35          'data': '{base}',
36          },
37      'posix_home': {
38 -        'stdlib': '{installed_base}/lib/python',
39 -        'platstdlib': '{base}/lib/python',
40 -        'purelib': '{base}/lib/python',
41 -        'platlib': '{base}/lib/python',
42 +        'stdlib': '{installed_base}/{platlibdir}/python',
43 +        'platstdlib': '{base}/{platlibdir}/python',
44 +        'purelib': '{base}/share/python',
45 +        'platlib': '{base}/{platlibdir}/python',
46          'include': '{installed_base}/include/python',
47          'platinclude': '{installed_base}/include/python',
48          'scripts': '{base}/bin',
49 @@ -100,8 +100,8 @@ if _HAS_USER_BASE:
50          'posix_user': {
51              'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
52              'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
53 -            'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
54 -            'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
55 +            'purelib': '{userbase}/share/python{py_version_short}/site-packages',
56 +            'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
57              'include': '{userbase}/include/python{py_version_short}',
58              'scripts': '{userbase}/bin',
59              'data': '{userbase}',
60 @@ -490,7 +490,11 @@ def get_config_h_filename():
61          else:
62              inc_dir = _PROJECT_BASE
63      else:
64 -        inc_dir = get_path('platinclude')
65 +        if hasattr(sys, 'abiflags'):
66 +            config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags)
67 +        else:
68 +            config_dir_name = 'config'
69 +        inc_dir = os.path.join(get_path('stdlib'), config_dir_name)
70      return os.path.join(inc_dir, 'pyconfig.h')
71  
72
73 --- Python-3.10.0/Makefile.pre.in~      2021-10-04 19:40:46.000000000 +0200
74 +++ Python-3.10.0/Makefile.pre.in       2021-10-20 22:21:30.573156183 +0200
75 @@ -1707,9 +1707,9 @@ libainstall:      @DEF_MAKE_RULE@ python-conf
76                 if test -d $(LIBRARY); then :; else \
77                         if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
78                                 if test "$(SHLIB_SUFFIX)" = .dll; then \
79 -                                       $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
80 +                                       $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
81                                 else \
82 -                                       $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
83 +                                       $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
84                                 fi; \
85                         else \
86                                 echo Skip install of $(LIBRARY) - use make frameworkinstall; \
87 --- Python-3.10.6/Lib/test/test_sysconfig.py.orig       2022-08-22 06:15:16.895139554 +0200
88 +++ Python-3.10.6/Lib/test/test_sysconfig.py    2022-08-22 06:18:57.331178879 +0200
89 @@ -299,13 +299,13 @@ class TestSysConfig(unittest.TestCase):
90                  expected = os.path.normpath(global_path.replace(base, user, 1))
91                  # bpo-44860: platlib of posix_user doesn't use sys.platlibdir,
92                  # whereas posix_prefix does.
93 -                if name == 'platlib':
94 +                if name != 'platlib':
95                      # Replace "/lib64/python3.11/site-packages" suffix
96                      # with "/lib/python3.11/site-packages".
97                      py_version_short = sysconfig.get_python_version()
98                      suffix = f'python{py_version_short}/site-packages'
99 -                    expected = expected.replace(f'/{sys.platlibdir}/{suffix}',
100 -                                                f'/lib/{suffix}')
101 +                    expected = expected.replace(f'/lib/{suffix}',
102 +                                                f'/{sys.platlibdir}/{suffix}')
103                  self.assertEqual(user_path, expected)
104  
105      def test_main(self):
106 --- Python-3.10.13/Lib/venv/__init__.py.orig    2023-08-24 14:46:25.000000000 +0200
107 +++ Python-3.10.13/Lib/venv/__init__.py 2023-09-23 12:30:09.948046280 +0200
108 @@ -145,10 +145,9 @@ class EnvBuilder:
109          create_if_needed(incpath)
110          context.lib_path = libpath
111          create_if_needed(libpath)
112 -        # Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
113 -        if ((sys.maxsize > 2**32) and (os.name == 'posix') and
114 -            (sys.platform != 'darwin')):
115 -            link_path = os.path.join(env_dir, 'lib64')
116 +        # Issue 21197: create lib<qual> as a symlink to lib on 64-bit non-OS X POSIX
117 +        if sys.platlibdir != 'lib':
118 +            link_path = os.path.join(env_dir, sys.platlibdir)
119              if not os.path.exists(link_path):   # Issue #21643
120                  os.symlink('lib', link_path)
121          context.bin_path = binpath
This page took 0.049789 seconds and 4 git commands to generate.