summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.7.4.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-10-10 13:18:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-15 14:16:10 +0100
commit0aee3558f93956630613994e89a8a42a560d7766 (patch)
treeccc509a50b130b99aa68d58991d4a9911c14b00c /meta/recipes-devtools/python/python3_3.7.4.bb
parenta4b2958adab161c07f4144e6e046ef9a02f2f30e (diff)
downloadpoky-0aee3558f93956630613994e89a8a42a560d7766.tar.gz
python3: make gdbm optional
The use case is building a gpl3-free image, without having to rely on outdated recipes from meta-gplv2 layer. (From OE-Core rev: 02eb487c8145e0f3d957c39cf16f6f805e95e536) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.7.4.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.7.4.bb22
1 files changed, 16 insertions, 6 deletions
diff --git a/meta/recipes-devtools/python/python3_3.7.4.bb b/meta/recipes-devtools/python/python3_3.7.4.bb
index 8693c446c2..58e2fa5abf 100644
--- a/meta/recipes-devtools/python/python3_3.7.4.bb
+++ b/meta/recipes-devtools/python/python3_3.7.4.bb
@@ -23,11 +23,12 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
23 file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ 23 file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
24 file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \ 24 file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
25 file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \ 25 file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
26 file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ 26 file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
27 file://crosspythonpath.patch \ 27 file://crosspythonpath.patch \
28 file://reformat_sysconfig.py \ 28 file://reformat_sysconfig.py \
29 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ 29 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
30 file://0001-test_locale.py-correct-the-test-output-format.patch \ 30 file://0001-test_locale.py-correct-the-test-output-format.patch \
31 file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
31 " 32 "
32 33
33SRC_URI_append_class-native = " \ 34SRC_URI_append_class-native = " \
@@ -62,7 +63,7 @@ ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config"
62ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" 63ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"
63 64
64 65
65DEPENDS = "bzip2-replacement-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" 66DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2"
66DEPENDS_append_class-target = " python3-native" 67DEPENDS_append_class-target = " python3-native"
67DEPENDS_append_class-nativesdk = " python3-native" 68DEPENDS_append_class-nativesdk = " python3-native"
68 69
@@ -87,13 +88,22 @@ python() {
87 d.setVar('PACKAGECONFIG_PGO', '') 88 d.setVar('PACKAGECONFIG_PGO', '')
88} 89}
89 90
90PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO}" 91PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm"
91PACKAGECONFIG_class-native ??= "readline" 92PACKAGECONFIG_class-native ??= "readline gdbm"
92PACKAGECONFIG_class-nativesdk ??= "readline" 93PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
93PACKAGECONFIG[readline] = ",,readline" 94PACKAGECONFIG[readline] = ",,readline"
94# Use profile guided optimisation by running PyBench inside qemu-user 95# Use profile guided optimisation by running PyBench inside qemu-user
95PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" 96PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
96PACKAGECONFIG[tk] = ",,tk" 97PACKAGECONFIG[tk] = ",,tk"
98PACKAGECONFIG[gdbm] = ",,gdbm"
99
100do_configure_prepend () {
101 mkdir -p ${B}/Modules
102 cat > ${B}/Modules/Setup.local << EOF
103*disabled*
104${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)}
105EOF
106}
97 107
98CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" 108CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid"
99 109