summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
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
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')
-rw-r--r--meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch10
-rw-r--r--meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch10
-rw-r--r--meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch31
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch2
-rw-r--r--meta/recipes-devtools/python/python3_3.7.4.bb22
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 @@
1From 17796e353acf08acd604610f34840a4a9d2f4b54 Mon Sep 17 00:00:00 2001 1From eff903c600f4c40f5753e95ab1557126fc6e0c9c Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 31 Jan 2019 16:46:30 +0100 3Date: Thu, 31 Jan 2019 16:46:30 +0100
4Subject: [PATCH] distutils/sysconfig: append 4Subject: [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
17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py 17diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
18index e07a6c8..6b8c129 100644 18index 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
30diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 30diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
31index 9ee4d31..e586abd 100644 31index 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 @@
1From ffe7797637f08cd6ee4c82e2d67462c5e194d30a Mon Sep 17 00:00:00 2001 1From 5ce3ac59531828ff682646fbba59b2126b28a8aa Mon Sep 17 00:00:00 2001
2From: Jaewon Lee <jaewon.lee@xilinx.com> 2From: Jaewon Lee <jaewon.lee@xilinx.com>
3Date: Thu, 25 Apr 2019 15:34:26 -0700 3Date: Thu, 25 Apr 2019 15:34:26 -0700
4Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME 4Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME
@@ -12,15 +12,16 @@ to set a different path for python3
12Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> 12Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
13 13
14Upstream-Status: Inappropriate [OE specific configuration] 14Upstream-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
19diff --git a/Modules/main.c b/Modules/main.c 20diff --git a/Modules/main.c b/Modules/main.c
20index a745381..b553e30 100644 21index 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--
482.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 @@
1From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 7 Oct 2019 13:22:14 +0200
4Subject: [PATCH] setup.py: do not report missing dependencies for disabled
5 modules
6
7Reporting those missing dependencies is misleading as the modules would not
8have been built anyway. This particularly matters in oe-core's automated
9build completeness checker which relies on the report.
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 setup.py | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/setup.py b/setup.py
18index 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 @@
1From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001 1From a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2013 15:00:26 -0700 3Date: Tue, 14 May 2013 15:00:26 -0700
4Subject: [PATCH] python3: Add target and native recipes 4Subject: [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
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