diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-10-10 13:18:41 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-15 14:16:10 +0100 |
| commit | 0aee3558f93956630613994e89a8a42a560d7766 (patch) | |
| tree | ccc509a50b130b99aa68d58991d4a9911c14b00c /meta/recipes-devtools/python | |
| parent | a4b2958adab161c07f4144e6e046ef9a02f2f30e (diff) | |
| download | poky-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')
5 files changed, 57 insertions, 18 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch index 1741f5753b..1709011be8 100644 --- a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch +++ b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 17796e353acf08acd604610f34840a4a9d2f4b54 Mon Sep 17 00:00:00 2001 | 1 | From eff903c600f4c40f5753e95ab1557126fc6e0c9c Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Thu, 31 Jan 2019 16:46:30 +0100 | 3 | Date: Thu, 31 Jan 2019 16:46:30 +0100 |
| 4 | Subject: [PATCH] distutils/sysconfig: append | 4 | Subject: [PATCH] distutils/sysconfig: append |
| @@ -15,10 +15,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
| 15 | 2 files changed, 4 insertions(+) | 15 | 2 files changed, 4 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py | 17 | diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py |
| 18 | index e07a6c8..6b8c129 100644 | 18 | index 0a034ee..3dfd0a3 100644 |
| 19 | --- a/Lib/distutils/sysconfig.py | 19 | --- a/Lib/distutils/sysconfig.py |
| 20 | +++ b/Lib/distutils/sysconfig.py | 20 | +++ b/Lib/distutils/sysconfig.py |
| 21 | @@ -421,6 +421,8 @@ def _init_posix(): | 21 | @@ -439,6 +439,8 @@ def _init_posix(): |
| 22 | platform=sys.platform, | 22 | platform=sys.platform, |
| 23 | multiarch=getattr(sys.implementation, '_multiarch', ''), | 23 | multiarch=getattr(sys.implementation, '_multiarch', ''), |
| 24 | )) | 24 | )) |
| @@ -28,10 +28,10 @@ index e07a6c8..6b8c129 100644 | |||
| 28 | build_time_vars = _temp.build_time_vars | 28 | build_time_vars = _temp.build_time_vars |
| 29 | global _config_vars | 29 | global _config_vars |
| 30 | diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py | 30 | diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py |
| 31 | index 9ee4d31..e586abd 100644 | 31 | index 87fa5e6..756a41c 100644 |
| 32 | --- a/Lib/sysconfig.py | 32 | --- a/Lib/sysconfig.py |
| 33 | +++ b/Lib/sysconfig.py | 33 | +++ b/Lib/sysconfig.py |
| 34 | @@ -412,6 +412,8 @@ def _init_posix(vars): | 34 | @@ -419,6 +419,8 @@ def _init_posix(vars): |
| 35 | """Initialize the module as appropriate for POSIX systems.""" | 35 | """Initialize the module as appropriate for POSIX systems.""" |
| 36 | # _sysconfigdata is generated at build time, see _generate_posix_vars() | 36 | # _sysconfigdata is generated at build time, see _generate_posix_vars() |
| 37 | name = _get_sysconfigdata_name() | 37 | name = _get_sysconfigdata_name() |
diff --git a/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch b/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch index a0ed7cc830..a146c747f8 100644 --- a/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch +++ b/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From ffe7797637f08cd6ee4c82e2d67462c5e194d30a Mon Sep 17 00:00:00 2001 | 1 | From 5ce3ac59531828ff682646fbba59b2126b28a8aa Mon Sep 17 00:00:00 2001 |
| 2 | From: Jaewon Lee <jaewon.lee@xilinx.com> | 2 | From: Jaewon Lee <jaewon.lee@xilinx.com> |
| 3 | Date: Thu, 25 Apr 2019 15:34:26 -0700 | 3 | Date: Thu, 25 Apr 2019 15:34:26 -0700 |
| 4 | Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME | 4 | Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME |
| @@ -12,15 +12,16 @@ to set a different path for python3 | |||
| 12 | Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> | 12 | Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> |
| 13 | 13 | ||
| 14 | Upstream-Status: Inappropriate [OE specific configuration] | 14 | Upstream-Status: Inappropriate [OE specific configuration] |
| 15 | |||
| 15 | --- | 16 | --- |
| 16 | Modules/main.c | 17 +++++++++++++---- | 17 | Modules/main.c | 17 +++++++++++++---- |
| 17 | 1 file changed, 13 insertions(+), 4 deletions(-) | 18 | 1 file changed, 13 insertions(+), 4 deletions(-) |
| 18 | 19 | ||
| 19 | diff --git a/Modules/main.c b/Modules/main.c | 20 | diff --git a/Modules/main.c b/Modules/main.c |
| 20 | index a745381..b553e30 100644 | 21 | index acc59c6..407085a 100644 |
| 21 | --- a/Modules/main.c | 22 | --- a/Modules/main.c |
| 22 | +++ b/Modules/main.c | 23 | +++ b/Modules/main.c |
| 23 | @@ -1855,10 +1855,19 @@ config_init_home(_PyCoreConfig *config) | 24 | @@ -1834,10 +1834,19 @@ config_init_home(_PyCoreConfig *config) |
| 24 | } | 25 | } |
| 25 | return _Py_INIT_OK(); | 26 | return _Py_INIT_OK(); |
| 26 | } | 27 | } |
| @@ -44,6 +45,3 @@ index a745381..b553e30 100644 | |||
| 44 | } | 45 | } |
| 45 | config->home = home; | 46 | config->home = home; |
| 46 | return _Py_INIT_OK(); | 47 | return _Py_INIT_OK(); |
| 47 | -- | ||
| 48 | 2.7.4 | ||
| 49 | |||
diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch new file mode 100644 index 0000000000..c15295c034 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Mon, 7 Oct 2019 13:22:14 +0200 | ||
| 4 | Subject: [PATCH] setup.py: do not report missing dependencies for disabled | ||
| 5 | modules | ||
| 6 | |||
| 7 | Reporting those missing dependencies is misleading as the modules would not | ||
| 8 | have been built anyway. This particularly matters in oe-core's automated | ||
| 9 | build completeness checker which relies on the report. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [oe-core specific] | ||
| 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 13 | --- | ||
| 14 | setup.py | 4 ++++ | ||
| 15 | 1 file changed, 4 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/setup.py b/setup.py | ||
| 18 | index 4b53668..0097643 100644 | ||
| 19 | --- a/setup.py | ||
| 20 | +++ b/setup.py | ||
| 21 | @@ -365,6 +365,10 @@ class PyBuildExt(build_ext): | ||
| 22 | print("%-*s %-*s %-*s" % (longest, e, longest, f, | ||
| 23 | longest, g)) | ||
| 24 | |||
| 25 | + # There is no need to report missing module dependencies, | ||
| 26 | + # if the modules have been disabled in the first place. | ||
| 27 | + missing = list(set(missing) - set(sysconf_dis)) | ||
| 28 | + | ||
| 29 | if missing: | ||
| 30 | print() | ||
| 31 | print("Python build finished successfully!") | ||
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch index 0bafec73c0..d49604ba4d 100644 --- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001 | 1 | From a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 14 May 2013 15:00:26 -0700 | 3 | Date: Tue, 14 May 2013 15:00:26 -0700 |
| 4 | Subject: [PATCH] python3: Add target and native recipes | 4 | Subject: [PATCH] python3: Add target and native recipes |
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 | ||
| 33 | SRC_URI_append_class-native = " \ | 34 | SRC_URI_append_class-native = " \ |
| @@ -62,7 +63,7 @@ ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config" | |||
| 62 | ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" | 63 | ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" |
| 63 | 64 | ||
| 64 | 65 | ||
| 65 | DEPENDS = "bzip2-replacement-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" | 66 | DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" |
| 66 | DEPENDS_append_class-target = " python3-native" | 67 | DEPENDS_append_class-target = " python3-native" |
| 67 | DEPENDS_append_class-nativesdk = " python3-native" | 68 | DEPENDS_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 | ||
| 90 | PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO}" | 91 | PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm" |
| 91 | PACKAGECONFIG_class-native ??= "readline" | 92 | PACKAGECONFIG_class-native ??= "readline gdbm" |
| 92 | PACKAGECONFIG_class-nativesdk ??= "readline" | 93 | PACKAGECONFIG_class-nativesdk ??= "readline gdbm" |
| 93 | PACKAGECONFIG[readline] = ",,readline" | 94 | PACKAGECONFIG[readline] = ",,readline" |
| 94 | # Use profile guided optimisation by running PyBench inside qemu-user | 95 | # Use profile guided optimisation by running PyBench inside qemu-user |
| 95 | PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" | 96 | PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" |
| 96 | PACKAGECONFIG[tk] = ",,tk" | 97 | PACKAGECONFIG[tk] = ",,tk" |
| 98 | PACKAGECONFIG[gdbm] = ",,gdbm" | ||
| 99 | |||
| 100 | do_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)} | ||
| 105 | EOF | ||
| 106 | } | ||
| 97 | 107 | ||
| 98 | CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" | 108 | CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" |
| 99 | 109 | ||
