From 44349672cbff8945693c8d2821c82e9f04bfc8b5 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Wed, 20 Oct 2021 17:38:10 +0000 Subject: [PATCH] _distutils/sysconfig: append STAGING_LIBDIR/python-sysconfigdata to sys.path When python modules set SETUPTOOLS_USE_DISTULS='local', this uses the vendored _distutils in setuptools rather than distutils in the Standard Library. This is needed so that target configuration can be used with python3-setuptools-native. Based on python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch from Alex Kanavin Upstream-Status: Inappropriate [oe-specific] Signed-off-by: Tim Orling --- setuptools/_distutils/sysconfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py index 8832b3e..bbc7c08 100644 --- a/setuptools/_distutils/sysconfig.py +++ b/setuptools/_distutils/sysconfig.py @@ -461,6 +461,8 @@ def _init_posix(): platform=sys.platform, multiarch=getattr(sys.implementation, '_multiarch', ''), )) + if 'STAGING_LIBDIR' in os.environ: + sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata') try: _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) except ImportError: