diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2012-04-05 23:54:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-26 10:05:16 +0100 |
commit | 1174fa7f0c0b1414ac7dbc9d8c43de00c1acbae6 (patch) | |
tree | 1c87dceed894306be944213a6386b0a2baaf0e33 | |
parent | fcb368f76716bd510e9492244a12b5c4a129aad5 (diff) | |
download | poky-1174fa7f0c0b1414ac7dbc9d8c43de00c1acbae6.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]
(From OE-Core rev: 79d0332f21769338a9f904308d8a808486e10fea)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch | 40 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.2.bb | 3 |
2 files changed, 42 insertions, 1 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 @@ | |||
1 | python should search for db.h in inc_dirs and not in a hardcoded path. | ||
2 | If db.h is found but HASHVERSION is not 2 we avoid a warning by not | ||
3 | adding this module to missing variable. | ||
4 | |||
5 | Upstream-Status: Inappropriate [distribution] | ||
6 | |||
7 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | ||
8 | |||
9 | Index: Python-2.7.2/setup.py | ||
10 | =================================================================== | ||
11 | --- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300 | ||
12 | +++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300 | ||
13 | @@ -1141,12 +1141,12 @@ | ||
14 | # the more recent berkeleydb's db.h file first in the include path | ||
15 | # when attempting to compile and it will fail. | ||
16 | f = "/usr/include/db.h" | ||
17 | - | ||
18 | + if len(inc_dirs) != 0: | ||
19 | + f = os.path.join(inc_dirs[0], "db.h") | ||
20 | if sys.platform == 'darwin': | ||
21 | if is_macosx_sdk_path(f): | ||
22 | sysroot = macosx_sdk_root() | ||
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)) | ||
30 | else: | ||
31 | exts.append(Extension('bsddb185', ['bsddbmodule.c'])) | ||
32 | - else: | ||
33 | - missing.append('bsddb185') | ||
34 | + # If a newer version is detected don't report an useless | ||
35 | + # warning | ||
36 | + #else: | ||
37 | + # missing.append('bsddb185') | ||
38 | else: | ||
39 | missing.append('bsddb185') | ||
40 | |||
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb index bfe3ee02f8..d25b882d95 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require python.inc | 1 | require python.inc |
2 | DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" | 2 | DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" |
3 | PR = "${INC_PR}.16" | 3 | PR = "${INC_PR}.17" |
4 | 4 | ||
5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | 5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" |
6 | DISTRO_SRC_URI_linuxstdbase = "" | 6 | DISTRO_SRC_URI_linuxstdbase = "" |
@@ -23,6 +23,7 @@ SRC_URI += "\ | |||
23 | file://fix_for_using_different_libdir.patch \ | 23 | file://fix_for_using_different_libdir.patch \ |
24 | file://setuptweaks.patch \ | 24 | file://setuptweaks.patch \ |
25 | file://check-if-target-is-64b-not-host.patch \ | 25 | file://check-if-target-is-64b-not-host.patch \ |
26 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | S = "${WORKDIR}/Python-${PV}" | 29 | S = "${WORKDIR}/Python-${PV}" |