blob: ac8b031cf58e203f0323ccb06150758606aacead [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From f3267ad7994a4b66e6bcf72cb0e418105f77bd52 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 11 Oct 2022 17:37:01 -0700
4Subject: [PATCH] _setuputils.py: Do not add sys_inc_dir
5
6sys_inc_dir computes to ignore sysroot and ends with paths into host
7system include area, which is then flagged by OE gcc since it finds
8the host include path poisoning. Since we are adding the syroot anyway
9we really do not need setuptools to deduce it for us.
10
11Upstream-Status: Inappropriate [ Cross-compile specific ]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 _setuputils.py | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-)
16
17diff --git a/_setuputils.py b/_setuputils.py
18index 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--
392.38.0
40