python: fix sysconfig.get_platform when run in a mingw shell
In a mingw shell it will call os.uname() which starts with MINGW.. resulting in bogus results. So just check for sys.platform which is always "cygwin". See #5143
This commit is contained in:
@@ -45,13 +45,13 @@
|
||||
else:
|
||||
print(cdll.LoadLibrary("libm.so"))
|
||||
--- Python-3.12.8/Lib/sysconfig.py.orig 2024-12-03 19:42:41.000000000 +0100
|
||||
+++ Python-3.12.8/Lib/sysconfig.py 2025-01-24 20:14:10.834146500 +0100
|
||||
+++ Python-3.12.8/Lib/sysconfig.py 2025-02-01 17:39:28.925188300 +0100
|
||||
@@ -815,13 +815,13 @@
|
||||
elif osname[:3] == "aix":
|
||||
from _aix_support import aix_platform
|
||||
return aix_platform()
|
||||
- elif osname[:6] == "cygwin":
|
||||
+ elif osname[:6] == "cygwin" or osname[:4] == "msys":
|
||||
+ elif sys.platform == "cygwin":
|
||||
+ # https://github.com/msys2/MSYS2-packages/issues/5143
|
||||
+ # Various build tools use the platform to derive the wheel tag
|
||||
+ # and the wheel tag needs to be stable for a specific platform
|
||||
|
||||
Reference in New Issue
Block a user