42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From e700661c014a12e571a8b6ae6ae3609c5096c3c9 Mon Sep 17 00:00:00 2001
|
|
From: Naveen M K <naveen521kk@gmail.com>
|
|
Date: Tue, 21 Sep 2021 21:37:23 +0200
|
|
Subject: [PATCH 085/N] distutils: Change the `get_platform()` method in
|
|
distutils to match sysconfig
|
|
|
|
This would possibly fix building wheels when mingw python
|
|
is used and would be unique to each python same as EXT_SUFFIX.
|
|
|
|
Signed-off-by: Naveen M K <naveen521kk@gmail.com>
|
|
---
|
|
Lib/distutils/util.py | 16 ++++++++++++++--
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
|
|
index ed9d509..28e623b 100644
|
|
--- a/Lib/distutils/util.py
|
|
+++ b/Lib/distutils/util.py
|
|
@@ -37,8 +37,20 @@ def get_host_platform():
|
|
|
|
"""
|
|
if os.name == 'nt':
|
|
- if 'GCC' in sys.version:
|
|
- return 'mingw'
|
|
+ if 'gcc' in sys.version.lower():
|
|
+ if 'ucrt' in sys.version.lower():
|
|
+ if 'amd64' in sys.version.lower():
|
|
+ return 'mingw_x86_64_ucrt'
|
|
+ return 'mingw_i686_ucrt'
|
|
+ if 'clang' in sys.version.lower():
|
|
+ if 'amd64' in sys.version.lower():
|
|
+ return 'mingw_x86_64_clang'
|
|
+ if 'arm64' in sys.version.lower():
|
|
+ return 'mingw_aarch64'
|
|
+ return 'mingw_i686_clang'
|
|
+ if 'amd64' in sys.version.lower():
|
|
+ return 'mingw_x86_64'
|
|
+ return 'mingw_i686'
|
|
if 'amd64' in sys.version.lower():
|
|
return 'win-amd64'
|
|
if '(arm)' in sys.version.lower():
|