summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2021-03-20 11:11:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-23 22:51:25 +0000
commit84e4c97835f58d49031784f2050cd5b149074633 (patch)
tree0e0008b14674e722c40399936cab835a7d623cf4 /meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
parent9d00a01831f22d93d4ac9a7e7151758e428b9750 (diff)
downloadpoky-84e4c97835f58d49031784f2050cd5b149074633.tar.gz
python3: fix PACKAGECONFIG handling
* it was changed from sysconf_dis to mods_disabled in: https://git.openembedded.org/openembedded-core/diff/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch?id=7347556b18b45c5f9afc2cade565a75c95876914 but unfortunately this doesn't work as mods_disabled set by remove_configured_extensions can contain only extensions which were disabled, as this list: self.extensions: ['_struct', 'array', '_contextvars', 'math', 'cmath', 'time', '_datetime', '_zoneinfo', '_random', '_bisect', '_heapq', '_pickle', 'atexit', '_json', '_lsprof', 'unicodedata', '_opcode', '_asyncio', '_abc', '_queue', '_statistics', 'fcntl', 'pwd', 'grp', 'spwd', 'select', 'parser', 'mmap', 'syslog', '_xxsubinterpreters', 'audioop', '_csv', '_posixsubprocess', '_testcapi', '_testinternalcapi', '_testbuffer', '_testimportmultiple', '_testmultiphase', '_xxtestfuzz', '_curses', '_curses_panel', '_crypt', '_socket', '_ssl', '_hashlib', '_sha256', '_sha512', '_md5', '_sha1', '_blake2', '_sha3', '_sqlite3', 'termios', 'resource', 'ossaudiodev', 'nis', 'zlib', 'binascii', '_bz2', '_lzma', 'pyexpat', '_elementtree', '_multibytecodec', '_codecs_kr', '_codecs_jp', '_codecs_cn', '_codecs_tw', '_codecs_hk', '_codecs_iso2022', '_decimal', '_ctypes_test', '_posixshmem', '_multiprocessing', '_uuid', 'xxlimited', '_ctypes'] while PACKAGECONFIG in python3 usually uses this to disable _dbm, _gdbm or runtime modules. * without this change the do_install will fail (based on check_build_completeness.py log.do_compile) with: | ERROR: Execution of '/OE/build/oe-core/tmp-glibc/work/x86_64-linux/python3-native/3.9.0-r0/temp/run.do_install.69743' failed with exit code 1: | The necessary bits to build these optional modules were not found: | _dbm _gdbm readline (From OE-Core rev: fa5243693e35e1e0dc3247e2178f181051f68e77) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch')
-rw-r--r--meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch10
1 files changed, 8 insertions, 2 deletions
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
index 5c620361da..5823273af3 100644
--- 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
@@ -10,6 +10,8 @@ build completeness checker which relies on the report.
10 10
11Upstream-Status: Inappropriate [oe-core specific] 11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
13 15
14--- 16---
15 setup.py | 4 ++++ 17 setup.py | 4 ++++
@@ -19,13 +21,17 @@ diff --git a/setup.py b/setup.py
19index 7691258..ec3f2a4 100644 21index 7691258..ec3f2a4 100644
20--- a/setup.py 22--- a/setup.py
21+++ b/setup.py 23+++ b/setup.py
22@@ -408,6 +408,10 @@ class PyBuildExt(build_ext): 24@@ -408,6 +408,14 @@ class PyBuildExt(build_ext):
23 print("%-*s %-*s %-*s" % (longest, e, longest, f, 25 print("%-*s %-*s %-*s" % (longest, e, longest, f,
24 longest, g)) 26 longest, g))
25 27
26+ # There is no need to report missing module dependencies, 28+ # There is no need to report missing module dependencies,
27+ # if the modules have been disabled in the first place. 29+ # if the modules have been disabled in the first place.
28+ self.missing = list(set(self.missing) - set(mods_disabled)) 30+ # cannot use mods_disabled here, because remove_configured_extensions adds
31+ # only disabled extensions into it (doesn't cover _dbm, _gdbm, readline
32+ # we support disabling through PACKAGECONFIG)
33+ sysconf_dis = sysconfig.get_config_var('MODDISABLED_NAMES').split()
34+ self.missing = list(set(self.missing) - set(sysconf_dis))
29+ 35+
30 if self.missing: 36 if self.missing:
31 print() 37 print()