From: Matthias Klose Date: Tue, 16 Nov 2021 10:24:31 +0000 (+0000) Subject: multiarch X-Git-Tag: archive/raspbian/3.9.9-1+rpi1^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c335e0a1aea837c91a31f420b3dcba58ee788ba;p=python3.9.git multiarch Gbp-Pq: Name multiarch.diff --- diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 6e7ddaa..551fbe9 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -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: diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index e3f79bf..f3dd3c6 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -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': diff --git a/Makefile.pre.in b/Makefile.pre.in index 96d9f68..0de37da 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -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