summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
diff options
context:
space:
mode:
authorWentao Zhang <wentao.zhang@windriver.com>2023-03-27 17:31:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-03 11:39:59 +0100
commit66f7944f9e93ebb43f8c9a343fea40c54c958de2 (patch)
tree389b0cde317fbcdc846ae898c4aa95672e1ae0ae /meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
parent3c7f0d2ec6d90b961ba0aae340a50e0930968771 (diff)
downloadpoky-66f7944f9e93ebb43f8c9a343fea40c54c958de2.tar.gz
python3: Fix failing sysconfig.py test on x86(64 bit) using lib64 as baselib by updating test_sysconfig for posix_user purelib
Steps to trigger the failed test: Edit local.conf to add something as follows: BASELIB = "lib64" IMAGE_INSTALL:append = " python3-tests". bitbake core-image-sato runqemu qemux86-64 nographic slirp Reproducer: $python3 -m test test_sysconfig sysconfig.py use platlibdir for purelib. Update test_sysconfig.test_user_similar() for the posix_user scheme: "purelib" doesn't use sys.platlibdir. (From OE-Core rev: 755321362e994a6a37a0f554b1aea56823de924e) Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch')
-rw-r--r--meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
new file mode 100644
index 0000000000..5e113415c2
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
@@ -0,0 +1,39 @@
1From b9f825b298b555c4770024d1f68ef1df65aad20a Mon Sep 17 00:00:00 2001
2From: Wentao Zhang <wentao.zhang@windriver.com>
3Date: Mon, 20 Mar 2023 13:39:52 +0800
4Subject: [PATCH] Update test_sysconfig for posix_user purelib
5
6Steps to trigger the failed test:
7Edit local.conf to add something as follows:
8 BASELIB = "lib64"
9 IMAGE_INSTALL:append = " python3-tests".
10bitbake core-image-sato
11runqemu qemux86-64 nographic slirp
12Reproducer:
13 $python3 -m test test_sysconfig
14
15Update test_sysconfig.test_user_similar() for the posix_user scheme:
16"purelib" doesn't use sys.platlibdir.
17
18Upstream-Status: Inappropriate [oe-core specific]
19Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
20---
21 Lib/test/test_sysconfig.py | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
25index d96371d..20aea4b 100644
26--- a/Lib/test/test_sysconfig.py
27+++ b/Lib/test/test_sysconfig.py
28@@ -373,7 +373,7 @@ class TestSysConfig(unittest.TestCase):
29 expected = os.path.normpath(global_path.replace(base, user, 1))
30 # bpo-44860: platlib of posix_user doesn't use sys.platlibdir,
31 # whereas posix_prefix does.
32- if name == 'platlib':
33+ if name == 'platlib' or name == 'purelib':
34 # Replace "/lib64/python3.11/site-packages" suffix
35 # with "/lib/python3.11/site-packages".
36 py_version_short = sysconfig.get_python_version()
37--
382.25.1
39