소스 검색

python: patch setup.py so that it does not include system include dirs

Seems that the Python C extensions were being
(or at least trying to be) build using '/usr/include' as the first
include folder.

Seems this issue was already fixed on MacOS X and now we've extended
it for our case.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Alexandru Ardelean 10 년 전
부모
커밋
aafbac886e
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14
    0
      lang/python/patches/120-do-not-add-include-dirs-when-cross-compiling.patch

+ 14
- 0
lang/python/patches/120-do-not-add-include-dirs-when-cross-compiling.patch 파일 보기

@@ -0,0 +1,14 @@
1
+diff --git a/setup.py b/setup.py
2
+index cbdeaf3..5154412 100644
3
+--- a/setup.py
4
++++ b/setup.py
5
+@@ -480,7 +480,8 @@ class PyBuildExt(build_ext):
6
+                         add_dir_to_list(dir_list, directory)
7
+ 
8
+         if os.path.normpath(sys.prefix) != '/usr' \
9
+-                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
10
++                and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
11
++                and not cross_compiling:
12
+             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
13
+             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
14
+             # building a framework with different architectures than