Skip to content

Commit

Permalink
Try to fix the pep425 output for platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
itziakos committed Aug 23, 2024
1 parent 20ff069 commit 1ae4a08
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions okonomiyaki/platforms/_pep425_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,20 @@ def _is_running_32bit():
def get_platform():
"""Return our platform name 'win32', 'linux_x86_64'"""
try:
import distutils.util
except ImportError:
import platform
result = platform.platform().lower()
import sysconfig
result = sysconfig.get_platform().string.replace(".", "_").replace("-", "_")
else:
result = distutils.util.get_platform().replace('.', '_').replace('-', '_')
if result == "linux_x86_64" and _is_running_32bit():
# 32 bit Python program (running on a 64 bit Linux): pip should only
# install and run 32 bit compiled extensions in that case.
result = "linux_i686"
if _is_running_32bit():
# 32 bit Python program (running on a 64 bit Linux): pip should only
# install and run 32 bit compiled extensions in that case.
if result == "linux_x86_64":
result = "linux_i686"
elif result == "linux_aarch64":
result = "linux_armv71"
return result
Expand Down

0 comments on commit 1ae4a08

Please sign in to comment.