aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-04-05 23:54:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-25 00:02:28 +0100
commit79d0332f21769338a9f904308d8a808486e10fea (patch)
tree35ed7eb42ec9c46811c64931b982e3e31edb0438 /meta/recipes-devtools/python/python
parent4993f50744882ee384cb8fb106ad209f0d887b3f (diff)
downloadopenembedded-core-79d0332f21769338a9f904308d8a808486e10fea.tar.gz
python: Add patch to search for db.h in inc_dirs and remove warning
python should search for db.h in inc_dirs and not in a hardcoded path. If db.h is found but HASHVERSION is not 2 we avoid a warning by not. adding this module to missing variable. [YOCTO #1937] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python')
-rw-r--r--meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch40
1 files changed, 40 insertions, 0 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
new file mode 100644
index 0000000000..0c1f1741cb
--- /dev/null
+++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
@@ -0,0 +1,40 @@
+python should search for db.h in inc_dirs and not in a hardcoded path.
+If db.h is found but HASHVERSION is not 2 we avoid a warning by not
+adding this module to missing variable.
+
+Upstream-Status: Inappropriate [distribution]
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Index: Python-2.7.2/setup.py
+===================================================================
+--- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300
++++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300
+@@ -1141,12 +1141,12 @@
+ # 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 len(inc_dirs) != 0:
++ f = os.path.join(inc_dirs[0], "db.h")
+ if sys.platform == 'darwin':
+ if is_macosx_sdk_path(f):
+ sysroot = macosx_sdk_root()
+ f = os.path.join(sysroot, f[1:])
+-
+ if os.path.exists(f) and not db_incs:
+ data = open(f).read()
+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
+@@ -1161,8 +1161,10 @@
+ libraries=libraries))
+ else:
+ exts.append(Extension('bsddb185', ['bsddbmodule.c']))
+- else:
+- missing.append('bsddb185')
++ # If a newer version is detected don't report an useless
++ # warning
++ #else:
++ # missing.append('bsddb185')
+ else:
+ missing.append('bsddb185')
+