summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch')
-rw-r--r--meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch23
1 files changed, 9 insertions, 14 deletions
diff --git a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
index 0c1f1741cb..dacb552ec7 100644
--- a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
+++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
@@ -6,26 +6,21 @@ Upstream-Status: Inappropriate [distribution]
6 6
7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> 7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
8 8
9Index: Python-2.7.2/setup.py 9
10=================================================================== 10diff --git a/setup.py b/setup.py
11--- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300 11index b887808..ae51607 100644
12+++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300 12--- a/setup.py
13@@ -1141,12 +1141,12 @@ 13+++ b/setup.py
14@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext):
14 # the more recent berkeleydb's db.h file first in the include path 15 # the more recent berkeleydb's db.h file first in the include path
15 # when attempting to compile and it will fail. 16 # when attempting to compile and it will fail.
16 f = "/usr/include/db.h" 17 f = "/usr/include/db.h"
17-
18+ if len(inc_dirs) != 0: 18+ if len(inc_dirs) != 0:
19+ f = os.path.join(inc_dirs[0], "db.h") 19+ f = os.path.join(inc_dirs[0], "db.h")
20 if sys.platform == 'darwin': 20
21 if host_platform == 'darwin':
21 if is_macosx_sdk_path(f): 22 if is_macosx_sdk_path(f):
22 sysroot = macosx_sdk_root() 23@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext):
23 f = os.path.join(sysroot, f[1:])
24-
25 if os.path.exists(f) and not db_incs:
26 data = open(f).read()
27 m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
28@@ -1161,8 +1161,10 @@
29 libraries=libraries)) 24 libraries=libraries))
30 else: 25 else:
31 exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 26 exts.append(Extension('bsddb185', ['bsddbmodule.c']))