diff mbox series

python3: Fix failing sysconfig.py test on x86(64 bit) by updating test_sysconfig for posix_user purelib

Message ID 20230321062952.2778799-1-wentao.zhang@windriver.com
State New
Headers show
Series python3: Fix failing sysconfig.py test on x86(64 bit) by updating test_sysconfig for posix_user purelib | expand

Commit Message

Wentao Zhang March 21, 2023, 6:29 a.m. UTC
sysconfig.py use platlibdir for purelib. Update
test_sysconfig.test_user_similar() for the posix_user
scheme: "purelib" doesn't use sys.platlibdir.

Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
---
 ...est_sysconfig-for-posix_user-purelib.patch | 30 +++++++++++++++++++
 .../recipes-devtools/python/python3_3.11.2.bb |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch

Comments

Alexander Kanavin March 21, 2023, 8:36 a.m. UTC | #1
How can the issue be triggered? It doesn’t show up in regular ptest, so can
you change the commit message to include that?

Alex

On Tue 21. Mar 2023 at 7.30, Wentao Zhang <wentao.zhang@windriver.com>
wrote:

> sysconfig.py use platlibdir for purelib. Update
> test_sysconfig.test_user_similar() for the posix_user
> scheme: "purelib" doesn't use sys.platlibdir.
>
> Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
> ---
>  ...est_sysconfig-for-posix_user-purelib.patch | 30 +++++++++++++++++++
>  .../recipes-devtools/python/python3_3.11.2.bb |  1 +
>  2 files changed, 31 insertions(+)
>  create mode 100644
> meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
>
> 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..3d39839309
> --- /dev/null
> +++
> b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
> @@ -0,0 +1,30 @@
> +From b9f825b298b555c4770024d1f68ef1df65aad20a Mon Sep 17 00:00:00 2001
> +From: Wentao Zhang <wentao.zhang@windriver.com>
> +Date: Mon, 20 Mar 2023 13:39:52 +0800
> +Subject: [PATCH] Update test_sysconfig for posix_user purelib
> +
> +Update test_sysconfig.test_user_similar() for the posix_user scheme:
> +"purelib" doesn't use sys.platlibdir.
> +
> +Upstream-Status: Inappropriate [oe-core specific]
> +Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
> +---
> + Lib/test/test_sysconfig.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
> +index d96371d..20aea4b 100644
> +--- a/Lib/test/test_sysconfig.py
> ++++ b/Lib/test/test_sysconfig.py
> +@@ -373,7 +373,7 @@ class TestSysConfig(unittest.TestCase):
> +                 expected = os.path.normpath(global_path.replace(base,
> user, 1))
> +                 # bpo-44860: platlib of posix_user doesn't use
> sys.platlibdir,
> +                 # whereas posix_prefix does.
> +-                if name == 'platlib':
> ++                if name == 'platlib' or name == 'purelib':
> +                     # Replace "/lib64/python3.11/site-packages" suffix
> +                     # with "/lib/python3.11/site-packages".
> +                     py_version_short = sysconfig.get_python_version()
> +--
> +2.25.1
> +
> diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb
> b/meta/recipes-devtools/python/python3_3.11.2.bb
> index 43c147ca6d..d3ef5c8bb7 100644
> --- a/meta/recipes-devtools/python/python3_3.11.2.bb
> +++ b/meta/recipes-devtools/python/python3_3.11.2.bb
> @@ -27,6 +27,7 @@ SRC_URI = "
> http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
>             file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch
> \
>             file://makerace.patch \
>             file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
> \
> +           file://0001-Update-test_sysconfig-for-posix_user-purelib.patch
> \
>
> file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \
>
> file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \
>             file://deterministic_imports.patch \
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178850):
> https://lists.openembedded.org/g/openembedded-core/message/178850
> Mute This Topic: https://lists.openembedded.org/mt/97749707/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Wentao Zhang March 23, 2023, 8:13 a.m. UTC | #2
my bad, this is only exits on multilib supported distro. please ignore

On 2023-03-21 16:36, Alexander Kanavin wrote:
> **
> *CAUTION: This email comes from a non Wind River email account!*
> Do not click links or open attachments unless you recognize the sender 
> and know the content is safe.
> How can the issue be triggered? It doesn’t show up in regular ptest, 
> so can you change the commit message to include that?
>
> Alex
>
> On Tue 21. Mar 2023 at 7.30, Wentao Zhang <wentao.zhang@windriver.com> 
> wrote:
>
>     sysconfig.py
>     <https://urldefense.com/v3/__http://sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcXty_F9A$>
>     use platlibdir for purelib. Update
>     test_sysconfig.test_user_similar() for the posix_user
>     scheme: "purelib" doesn't use sys.platlibdir.
>
>     Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
>     ---
>      ...est_sysconfig-for-posix_user-purelib.patch | 30
>     +++++++++++++++++++
>      .../recipes-devtools/python/python3_3.11.2.bb
>     <https://urldefense.com/v3/__http://python3_3.11.2.bb__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcZTR-p8E$>
>     |  1 +
>      2 files changed, 31 insertions(+)
>      create mode 100644
>     meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
>
>     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..3d39839309
>     --- /dev/null
>     +++
>     b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
>     @@ -0,0 +1,30 @@
>     +From b9f825b298b555c4770024d1f68ef1df65aad20a Mon Sep 17 00:00:00
>     2001
>     +From: Wentao Zhang <wentao.zhang@windriver.com>
>     +Date: Mon, 20 Mar 2023 13:39:52 +0800
>     +Subject: [PATCH] Update test_sysconfig for posix_user purelib
>     +
>     +Update test_sysconfig.test_user_similar() for the posix_user scheme:
>     +"purelib" doesn't use sys.platlibdir.
>     +
>     +Upstream-Status: Inappropriate [oe-core specific]
>     +Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
>     +---
>     + Lib/test/test_sysconfig.py
>     <https://urldefense.com/v3/__http://test_sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcddGxdwo$>
>     | 2 +-
>     + 1 file changed, 1 insertion(+), 1 deletion(-)
>     +
>     +diff --git a/Lib/test/test_sysconfig.py
>     <https://urldefense.com/v3/__http://test_sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcddGxdwo$>
>     b/Lib/test/test_sysconfig.py
>     <https://urldefense.com/v3/__http://test_sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcddGxdwo$>
>     +index d96371d..20aea4b 100644
>     +--- a/Lib/test/test_sysconfig.py
>     <https://urldefense.com/v3/__http://test_sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcddGxdwo$>
>     ++++ b/Lib/test/test_sysconfig.py
>     <https://urldefense.com/v3/__http://test_sysconfig.py__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcddGxdwo$>
>     +@@ -373,7 +373,7 @@ class TestSysConfig(unittest.TestCase):
>     +                 expected =
>     os.path.normpath(global_path.replace(base, user, 1))
>     +                 # bpo-44860: platlib of posix_user doesn't use
>     sys.platlibdir,
>     +                 # whereas posix_prefix does.
>     +-                if name == 'platlib':
>     ++                if name == 'platlib' or name == 'purelib':
>     +                     # Replace "/lib64/python3.11/site-packages"
>     suffix
>     +                     # with "/lib/python3.11/site-packages".
>     +                     py_version_short =
>     sysconfig.get_python_version()
>     +--
>     +2.25.1
>     +
>     diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb
>     <https://urldefense.com/v3/__http://python3_3.11.2.bb__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcZTR-p8E$>
>     b/meta/recipes-devtools/python/python3_3.11.2.bb
>     <https://urldefense.com/v3/__http://python3_3.11.2.bb__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcZTR-p8E$>
>     index 43c147ca6d..d3ef5c8bb7 100644
>     --- a/meta/recipes-devtools/python/python3_3.11.2.bb
>     <https://urldefense.com/v3/__http://python3_3.11.2.bb__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcZTR-p8E$>
>     +++ b/meta/recipes-devtools/python/python3_3.11.2.bb
>     <https://urldefense.com/v3/__http://python3_3.11.2.bb__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BcZTR-p8E$>
>     @@ -27,6 +27,7 @@ SRC_URI =
>     "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz
>     <https://urldefense.com/v3/__http://www.python.org/ftp/python/$*7BPV*7D/Python-$*7BPV*7D.tar.xz__;JSUlJQ!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1Bc-7ryPCU$>
>     \
>     file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \
>     file://makerace.patch \
>     file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \
>     + file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
>     file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
>     \
>     file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch
>     \
>     file://deterministic_imports.patch \
>     -- 
>     2.25.1
>
>
>     -=-=-=-=-=-=-=-=-=-=-=-
>     Links: You receive all messages sent to this group.
>     View/Reply Online (#178850):
>     https://lists.openembedded.org/g/openembedded-core/message/178850
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/178850__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1BczR6HXBk$>
>     Mute This Topic:
>     https://lists.openembedded.org/mt/97749707/1686489
>     <https://urldefense.com/v3/__https://lists.openembedded.org/mt/97749707/1686489__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1Bc7cdaIT0$>
>     Group Owner: openembedded-core+owner@lists.openembedded.org
>     <mailto:openembedded-core%2Bowner@lists.openembedded.org>
>     Unsubscribe:
>     https://lists.openembedded.org/g/openembedded-core/unsub
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!cPjxAEbIc2ellPX8NJfc-1d33Tc_1F4FvAfVHypTTSsQEgAnD3qbeURMwZ-9H2XLMULtRg7Tii8qAxLTg1Bc0hXTU04$>
>     [alex.kanavin@gmail.com]
>     -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

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..3d39839309
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch
@@ -0,0 +1,30 @@ 
+From b9f825b298b555c4770024d1f68ef1df65aad20a Mon Sep 17 00:00:00 2001
+From: Wentao Zhang <wentao.zhang@windriver.com>
+Date: Mon, 20 Mar 2023 13:39:52 +0800
+Subject: [PATCH] Update test_sysconfig for posix_user purelib
+
+Update test_sysconfig.test_user_similar() for the posix_user scheme:
+"purelib" doesn't use sys.platlibdir.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
+---
+ Lib/test/test_sysconfig.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
+index d96371d..20aea4b 100644
+--- a/Lib/test/test_sysconfig.py
++++ b/Lib/test/test_sysconfig.py
+@@ -373,7 +373,7 @@ class TestSysConfig(unittest.TestCase):
+                 expected = os.path.normpath(global_path.replace(base, user, 1))
+                 # bpo-44860: platlib of posix_user doesn't use sys.platlibdir,
+                 # whereas posix_prefix does.
+-                if name == 'platlib':
++                if name == 'platlib' or name == 'purelib':
+                     # Replace "/lib64/python3.11/site-packages" suffix
+                     # with "/lib/python3.11/site-packages".
+                     py_version_short = sysconfig.get_python_version()
+-- 
+2.25.1
+
diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb
index 43c147ca6d..d3ef5c8bb7 100644
--- a/meta/recipes-devtools/python/python3_3.11.2.bb
+++ b/meta/recipes-devtools/python/python3_3.11.2.bb
@@ -27,6 +27,7 @@  SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \
            file://makerace.patch \
            file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \
+           file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
            file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \
            file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \
            file://deterministic_imports.patch \