summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.13.bb
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-11-01 00:28:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:57 +0000
commitc76a25b6ac36b043530fab4bb35c1b62f26c545f (patch)
tree5dd2ff6e570d8afd2a93e1bcceb7e891aa30d306 /meta/recipes-devtools/python/python_2.7.13.bb
parent1002359e5e5cd191911ea90d5d820f995a4199be (diff)
downloadpoky-c76a25b6ac36b043530fab4bb35c1b62f26c545f.tar.gz
python: add PACKAGECONFIG for Berkeley DB module
The bsddb module is deprecated and requires an old version of Berkeley DB that some may be unhappy with even shipping, so expose a way to disable the module. (From OE-Core rev: 25460ccdebaa6ff29ec051a0489a51b19c34e79c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.13.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.13.bb14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb
index 877069943e..754c029097 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -1,5 +1,5 @@
1require python.inc 1require python.inc
2DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib" 2DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
3PR = "${INC_PR}" 3PR = "${INC_PR}"
4 4
5DISTRO_SRC_URI ?= "file://sitecustomize.py" 5DISTRO_SRC_URI ?= "file://sitecustomize.py"
@@ -39,6 +39,9 @@ CONFIGUREOPTS += " --with-system-ffi "
39 39
40EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no" 40EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
41 41
42PACKAGECONFIG ??= "bdb"
43PACKAGECONFIG[bdb] = ",,db"
44
42do_configure_append() { 45do_configure_append() {
43 rm -f ${S}/Makefile.orig 46 rm -f ${S}/Makefile.orig
44 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi 47 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
@@ -118,6 +121,10 @@ do_install() {
118 fi 121 fi
119 122
120 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h 123 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
124
125 if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
126 rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
127 fi
121} 128}
122 129
123do_install_append_class-nativesdk () { 130do_install_append_class-nativesdk () {
@@ -154,6 +161,8 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
154PACKAGES += "${PN}-misc" 161PACKAGES += "${PN}-misc"
155FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" 162FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
156RDEPENDS_${PN}-modules += "${PN}-misc" 163RDEPENDS_${PN}-modules += "${PN}-misc"
164
165# ptest
157RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests" 166RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
158#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten 167#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
159inherit ptest 168inherit ptest
@@ -180,4 +189,7 @@ do_install_ptest() {
180PACKAGES += "${PN}-man" 189PACKAGES += "${PN}-man"
181FILES_${PN}-man = "${datadir}/man" 190FILES_${PN}-man = "${datadir}/man"
182 191
192# Nasty but if bdb isn't enabled the package won't be generated
193RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
194
183BBCLASSEXTEND = "nativesdk" 195BBCLASSEXTEND = "nativesdk"