Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 1ff575308248b183639c8cb14afee7c8572bd2b8 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 2 | From: Tim Orling <timothy.t.orling@intel.com> |
| 3 | Date: Wed, 20 Oct 2021 17:38:10 +0000 |
| 4 | Subject: [PATCH] _distutils/sysconfig: append |
| 5 | STAGING_LIBDIR/python-sysconfigdata to sys.path |
| 6 | |
| 7 | When python modules set SETUPTOOLS_USE_DISTULS='local', this uses the |
| 8 | vendored _distutils in setuptools rather than distutils in the Standard |
| 9 | Library. This is needed so that target configuration can be used with |
| 10 | python3-setuptools-native. |
| 11 | |
| 12 | Based on python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch |
| 13 | from Alex Kanavin <alex.kanavin@gmail.com> |
| 14 | |
| 15 | Upstream-Status: Inappropriate [oe-specific] |
| 16 | |
| 17 | Signed-off-by: Tim Orling <timothy.t.orling@intel.com> |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 18 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 19 | --- |
| 20 | setuptools/_distutils/sysconfig.py | 2 ++ |
| 21 | 1 file changed, 2 insertions(+) |
| 22 | |
| 23 | diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 24 | index d36d94f..616eb91 100644 |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 25 | --- a/setuptools/_distutils/sysconfig.py |
| 26 | +++ b/setuptools/_distutils/sysconfig.py |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 27 | @@ -484,6 +484,8 @@ def _init_posix(): |
| 28 | multiarch=getattr(sys.implementation, '_multiarch', ''), |
| 29 | ), |
| 30 | ) |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 31 | + if 'STAGING_LIBDIR' in os.environ: |
| 32 | + sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata') |
| 33 | try: |
| 34 | _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) |
| 35 | except ImportError: |