Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame^] | 1 | From f3267ad7994a4b66e6bcf72cb0e418105f77bd52 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 11 Oct 2022 17:37:01 -0700 |
| 4 | Subject: [PATCH] _setuputils.py: Do not add sys_inc_dir |
| 5 | |
| 6 | sys_inc_dir computes to ignore sysroot and ends with paths into host |
| 7 | system include area, which is then flagged by OE gcc since it finds |
| 8 | the host include path poisoning. Since we are adding the syroot anyway |
| 9 | we really do not need setuptools to deduce it for us. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [ Cross-compile specific ] |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 13 | --- |
| 14 | _setuputils.py | 3 +-- |
| 15 | 1 file changed, 1 insertion(+), 2 deletions(-) |
| 16 | |
| 17 | diff --git a/_setuputils.py b/_setuputils.py |
| 18 | index d98f716..31134a4 100644 |
| 19 | --- a/_setuputils.py |
| 20 | +++ b/_setuputils.py |
| 21 | @@ -161,7 +161,6 @@ def get_include_dirs(*extra_paths): |
| 22 | # Neither sysconfig dir is not enough if we're in a virtualenv; the greenlet.h |
| 23 | # header goes into a site/ subdir. See https://github.com/pypa/pip/issues/4610 |
| 24 | dist_inc_dir = os.path.abspath(dist_sysconfig.get_python_inc()) # 1 |
| 25 | - sys_inc_dir = os.path.abspath(sysconfig.get_path("include")) # 2 |
| 26 | venv_include_dir = os.path.join( |
| 27 | sys.prefix, 'include', 'site', |
| 28 | 'python' + sysconfig.get_python_version() |
| 29 | @@ -175,7 +174,7 @@ def get_include_dirs(*extra_paths): |
| 30 | |
| 31 | return [ |
| 32 | p |
| 33 | - for p in (dist_inc_dir, sys_inc_dir, dep_inc_dir) + extra_paths |
| 34 | + for p in (dist_inc_dir, dep_inc_dir) + extra_paths |
| 35 | if os.path.exists(p) |
| 36 | ] |
| 37 | |
| 38 | -- |
| 39 | 2.38.0 |
| 40 | |