diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-01-20 18:24:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-21 12:52:52 +0000 |
commit | 28c5a5033e4893ec1f1fd5aab8b2fd0d5f815678 (patch) | |
tree | 516cabd91f2d95e50eb1980efa4cda946fdb8b57 /meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch | |
parent | f7a99d04e6fb81ffbb14cfa3caaf47e89bb424b5 (diff) | |
download | poky-28c5a5033e4893ec1f1fd5aab8b2fd0d5f815678.tar.gz |
python3: update to 3.8.1
Drop backports, rebase other patches.
0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
is removed as the use case (allowing python 2 and 3 to coexist
in SDKs) is no longer relevant with Python 2.x reaching end of line
and upstream has refactored the code making a rebase difficult.
If needed, please re-add the patch to py2, rather than py3.
Python 3.8 no longer adds "m" to "3.8" in paths, so adjust the recipes
and classes accordingly.
The manifest for the 3.8.0 version is updated; particularly pkgutil
module is now packaged in -core (as other things in core need it);
this also necessitates allowing empty -pkgutil package to avoid
breakage across layers.
(From OE-Core rev: e6ab9f16b92aa1abdae82c535c1a452a1341b0e2)
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/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch new file mode 100644 index 0000000000..d38ed61dd7 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 7019ba184b828ed7253750cf409fc5760ef90a54 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 9 Jan 2020 17:44:05 +0100 | ||
4 | Subject: [PATCH] setup.py: pass missing libraries to Extension for | ||
5 | multiprocessing module | ||
6 | |||
7 | In the following commit: | ||
8 | ... | ||
9 | commit e711cafab13efc9c1fe6c5cd75826401445eb585 | ||
10 | Author: Benjamin Peterson <benjamin@python.org> | ||
11 | Date: Wed Jun 11 16:44:04 2008 +0000 | ||
12 | |||
13 | Merged revisions 64104,64117 via svnmerge from | ||
14 | svn+ssh://pythondev@svn.python.org/python/trunk | ||
15 | ... | ||
16 | (see diff in setup.py) | ||
17 | It assigned libraries for multiprocessing module according | ||
18 | the host_platform, but not pass it to Extension. | ||
19 | |||
20 | In glibc, the following commit caused two definition of | ||
21 | sem_getvalue are different. | ||
22 | https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524 | ||
23 | (see diff in nptl/sem_getvalue.c for detail) | ||
24 | `__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1 | ||
25 | and `__old_sem_getvalue' is to compat the old version | ||
26 | sem_getvalue@GLIBC_2.0. | ||
27 | |||
28 | To build python for embedded Linux systems: | ||
29 | http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html | ||
30 | If not explicitly link to library pthread (-lpthread), it will | ||
31 | load glibc's sem_getvalue randomly at runtime. | ||
32 | |||
33 | Such as build python on linux x86_64 host and run the python | ||
34 | on linux x86_32 target. If not link library pthread, it caused | ||
35 | multiprocessing bounded semaphore could not work correctly. | ||
36 | ... | ||
37 | >>> import multiprocessing | ||
38 | >>> pool_sema = multiprocessing.BoundedSemaphore(value=1) | ||
39 | >>> pool_sema.acquire() | ||
40 | True | ||
41 | >>> pool_sema.release() | ||
42 | Traceback (most recent call last): | ||
43 | File "<stdin>", line 1, in <module> | ||
44 | ValueError: semaphore or lock released too many times | ||
45 | ... | ||
46 | |||
47 | And the semaphore issue also caused multiprocessing.Queue().put() hung. | ||
48 | |||
49 | Upstream-Status: Pensing | ||
50 | |||
51 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
52 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
53 | --- | ||
54 | setup.py | 2 +- | ||
55 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
56 | |||
57 | diff --git a/setup.py b/setup.py | ||
58 | index ec3f2a4..b0f1541 100644 | ||
59 | --- a/setup.py | ||
60 | +++ b/setup.py | ||
61 | @@ -1671,7 +1671,7 @@ class PyBuildExt(build_ext): | ||
62 | libraries=libs, | ||
63 | include_dirs=["Modules/_multiprocessing"])) | ||
64 | |||
65 | - self.add(Extension('_multiprocessing', multiprocessing_srcs, | ||
66 | + self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'], | ||
67 | include_dirs=["Modules/_multiprocessing"])) | ||
68 | |||
69 | def detect_uuid(self): | ||