diff options
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.patch | 37 |
1 files changed, 37 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..b6c6ac5a28 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 37d058e841ba3bd89b5746cc5381afb014b11581 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wentao Zhang <wentao.zhang@windriver.com> | ||
3 | Date: Mon, 20 Mar 2023 13:39:52 +0800 | ||
4 | Subject: [PATCH] Update test_sysconfig for posix_user purelib | ||
5 | |||
6 | Steps to trigger the failed test: | ||
7 | Edit local.conf to add something as follows: | ||
8 | BASELIB = "lib64" | ||
9 | IMAGE_INSTALL:append = " python3-tests". | ||
10 | bitbake core-image-sato | ||
11 | runqemu qemux86-64 nographic slirp | ||
12 | Reproducer: | ||
13 | $python3 -m test test_sysconfig | ||
14 | |||
15 | Update test_sysconfig.test_user_similar() for the posix_user scheme: | ||
16 | "purelib" doesn't use sys.platlibdir. | ||
17 | |||
18 | Upstream-Status: Inappropriate [oe-core specific] | ||
19 | Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> | ||
20 | |||
21 | --- | ||
22 | Lib/test/test_sysconfig.py | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py | ||
26 | index b6dbf3d..5672590 100644 | ||
27 | --- a/Lib/test/test_sysconfig.py | ||
28 | +++ b/Lib/test/test_sysconfig.py | ||
29 | @@ -372,7 +372,7 @@ class TestSysConfig(unittest.TestCase): | ||
30 | expected = os.path.normpath(global_path.replace(base, user, 1)) | ||
31 | # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, | ||
32 | # whereas posix_prefix does. | ||
33 | - if name == 'platlib': | ||
34 | + if name == 'platlib' or name == 'purelib': | ||
35 | # Replace "/lib64/python3.11/site-packages" suffix | ||
36 | # with "/lib/python3.11/site-packages". | ||
37 | py_version_short = sysconfig.get_python_version() | ||