multiarch
authorMatthias Klose <doko@debian.org>
Sun, 7 Nov 2021 15:47:09 +0000 (15:47 +0000)
committerMatthias Klose <doko@debian.org>
Sun, 7 Nov 2021 15:47:09 +0000 (15:47 +0000)
Gbp-Pq: Name multiarch.diff

Lib/distutils/sysconfig.py
Lib/sysconfig.py
Makefile.pre.in

index 6e7ddaa9b3093e4286d5cb5a91588f87277c6ece..551fbe969136839af36c2e6e3d04961070eb4c9c 100644 (file)
@@ -110,6 +110,9 @@ def get_python_inc(plat_specific=0, prefix=None):
                 incdir = os.path.join(get_config_var('srcdir'), 'Include')
                 return os.path.normpath(incdir)
         python_dir = 'python' + get_python_version() + build_flags
+        if not python_build and plat_specific:
+            import sysconfig
+            return sysconfig.get_path('platinclude')
         return os.path.join(prefix, "include", python_dir)
     elif os.name == "nt":
         if python_build:
index e3f79bfde52948d4b49d11e732a90e2a06c0f1cf..f3dd3c6f7cf6d0cdef9d3b5c071390fd555b7a19 100644 (file)
@@ -571,6 +571,12 @@ def get_config_vars(*args):
         # the init-function.
         _CONFIG_VARS['userbase'] = _getuserbase()
 
+        multiarch = get_config_var('MULTIARCH')
+        if multiarch:
+            _CONFIG_VARS['multiarchsubdir'] = '/' + multiarch
+        else:
+            _CONFIG_VARS['multiarchsubdir'] = ''
+
         # Always convert srcdir to an absolute path
         srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
         if os.name == 'posix':
index 96d9f68ddc429671001f42f5ab5cd7027b247177..0de37da4acf30d4fd9cd510c8488126b01647804 100644 (file)
@@ -822,6 +822,7 @@ Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posix
 
 Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
        $(CC) -c $(PY_CORE_CFLAGS) \
+               $(if $(MULTIARCH),-DMULTIARCH='"$(MULTIARCH)"') \
                -DSOABI='"$(SOABI)"' \
                -o $@ $(srcdir)/Python/dynload_shlib.c