Debian Codegraph @

debian/patches/stdlib/sysconfigdata-name

raw
1 From: Stefano Rivera <[email protected]>
2 Date: Sat, 10 Aug 2024 17:54:30 +0900
3 Subject: gh-81742 Omit platform from _sysconfigdata filename for multiarch
4
5 The multiarch triple encodes the platform name, so there is no need to
6 have both in the _sysconfigdata filename.
7
8 Debian has been carrying a (dumber) variant of this patch for a while.
9
10 Fixes: #81742
11
12 Origin: Debian cpython packaging
13 Forwarded: https://github.com/python/cpython/pull/122879
14 Bug-Upstream: https://github.com/python/cpython/issues/81742
15 ---
16 lib-python/3/sysconfig.py | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19 diff --git a/lib-python/3/sysconfig.py b/lib-python/3/sysconfig.py
20 index 173c7a4..b5341b8 100644
21 --- a/lib-python/3/sysconfig.py
22 +++ b/lib-python/3/sysconfig.py
23 @@ -499,9 +499,10 @@ def get_makefile_filename():
24
25 def _get_sysconfigdata_name():
26 multiarch = getattr(sys.implementation, '_multiarch', '')
27 + platform = multiarch or sys.platform
28 return os.environ.get(
29 '_PYTHON_SYSCONFIGDATA_NAME',
30 - f'_sysconfigdata_{sys.abiflags}_{sys.platform}_{multiarch}',
31 + f'_sysconfigdata_{sys.abiflags}_{platform}',
32 )
33
34