summaryrefslogtreecommitdiffstats
path: root/patches/Python-2.7.16/0004-setup.py-don-t-leak-host-path-into-cross-compilation.patch
blob: 95a97e3f421b929137896733ef1b433d9f5b516b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Tue, 28 Apr 2009 19:07:54 +0200
Subject: [PATCH] setup.py: don't leak host path into cross compilation
 environment

During cross compilation we don't host path (neither include nor library
search patch) to leak into our environment.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 setup.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/setup.py b/setup.py
index 33cecc687573..521b6e77c234 100644
--- a/setup.py
+++ b/setup.py
@@ -1228,6 +1228,9 @@ class PyBuildExt(build_ext):
         # the more recent berkeleydb's db.h file first in the include path
         # when attempting to compile and it will fail.
         f = "/usr/include/db.h"
+        if cross_compiling:
+            f = ''
+
 
         if host_platform == 'darwin':
             if is_macosx_sdk_path(f):