Skip to content

Commit

Permalink
Return consistent architecture markers for python on mingw/armv7
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo authored and lazka committed Jul 19, 2023
1 parent 6e4161f commit 7ba998f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/distutils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def get_host_platform():
return 'mingw_x86_64_clang'
if 'arm64' in sys.version.lower():
return 'mingw_aarch64'
if 'arm' in sys.version.lower():
return 'mingw_armv7'
return 'mingw_i686_clang'
if 'amd64' in sys.version.lower():
return 'mingw_x86_64'
Expand Down
2 changes: 2 additions & 0 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ def get_platform():
return 'mingw_x86_64_clang'
if 'arm64' in sys.version.lower():
return 'mingw_aarch64'
if 'arm' in sys.version.lower():
return 'mingw_armv7'
return 'mingw_i686_clang'
if 'amd64' in sys.version.lower():
return 'mingw_x86_64'
Expand Down
2 changes: 2 additions & 0 deletions Python/getcompiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#define ARCH_SUFFIX " 64 bit (AMD64)"
#elif defined(__aarch64__)
#define ARCH_SUFFIX " 64 bit (ARM64)"
#elif defined(__arm__)
#define ARCH_SUFFIX " 32 bit (ARM)"
#else
#define ARCH_SUFFIX " 32 bit"
#endif
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6017,6 +6017,9 @@ case $host_os in
aarch64-*-mingw*)
PYD_PLATFORM_TAG+="mingw_aarch64"
;;
armv7-*-mingw*)
PYD_PLATFORM_TAG+="mingw_armv7"
;;
esac
AC_MSG_RESULT($PYD_PLATFORM_TAG)
esac
Expand Down

0 comments on commit 7ba998f

Please sign in to comment.