|
|
@@ -442,8 +442,9 @@ if P3DSUFFIX is None:
|
|
|
|
|
|
# Now determine the distutils-style platform tag for the target system.
|
|
|
target = GetTarget()
|
|
|
+target_arch = GetTargetArch()
|
|
|
if target == 'windows':
|
|
|
- if GetTargetArch() == 'x64':
|
|
|
+ if target_arch == 'x64':
|
|
|
PLATFORM = 'win-amd64'
|
|
|
else:
|
|
|
PLATFORM = 'win32'
|
|
|
@@ -460,7 +461,7 @@ elif target == 'darwin':
|
|
|
|
|
|
arch_tag = None
|
|
|
if not OSX_ARCHS:
|
|
|
- arch_tag = GetTargetArch()
|
|
|
+ arch_tag = target_arch
|
|
|
elif len(OSX_ARCHS) == 1:
|
|
|
arch_tag = OSX_ARCHS[0]
|
|
|
elif frozenset(OSX_ARCHS) == frozenset(('i386', 'ppc')):
|
|
|
@@ -482,45 +483,53 @@ elif target == 'darwin':
|
|
|
|
|
|
elif target == 'linux' and (os.path.isfile("/lib/libc-2.5.so") or os.path.isfile("/lib64/libc-2.5.so")) and os.path.isdir("/opt/python"):
|
|
|
# This is manylinux1. A bit of a sloppy check, though.
|
|
|
- if GetTargetArch() in ('x86_64', 'amd64'):
|
|
|
+ if target_arch in ('x86_64', 'amd64'):
|
|
|
PLATFORM = 'manylinux1-x86_64'
|
|
|
- elif GetTargetArch() in ('arm64', 'aarch64'):
|
|
|
+ elif target_arch in ('arm64', 'aarch64'):
|
|
|
PLATFORM = 'manylinux1-aarch64'
|
|
|
else:
|
|
|
PLATFORM = 'manylinux1-i686'
|
|
|
|
|
|
elif target == 'linux' and (os.path.isfile("/lib/libc-2.12.so") or os.path.isfile("/lib64/libc-2.12.so")) and os.path.isdir("/opt/python"):
|
|
|
# Same sloppy check for manylinux2010.
|
|
|
- if GetTargetArch() in ('x86_64', 'amd64'):
|
|
|
+ if target_arch in ('x86_64', 'amd64'):
|
|
|
PLATFORM = 'manylinux2010-x86_64'
|
|
|
- elif GetTargetArch() in ('arm64', 'aarch64'):
|
|
|
+ elif target_arch in ('arm64', 'aarch64'):
|
|
|
PLATFORM = 'manylinux2010-aarch64'
|
|
|
else:
|
|
|
PLATFORM = 'manylinux2010-i686'
|
|
|
|
|
|
elif target == 'linux' and (os.path.isfile("/lib/libc-2.17.so") or os.path.isfile("/lib64/libc-2.17.so")) and os.path.isdir("/opt/python"):
|
|
|
# Same sloppy check for manylinux2014.
|
|
|
- if GetTargetArch() in ('x86_64', 'amd64'):
|
|
|
+ if target_arch in ('x86_64', 'amd64'):
|
|
|
PLATFORM = 'manylinux2014-x86_64'
|
|
|
- elif GetTargetArch() in ('arm64', 'aarch64'):
|
|
|
+ elif target_arch in ('arm64', 'aarch64'):
|
|
|
PLATFORM = 'manylinux2014-aarch64'
|
|
|
else:
|
|
|
PLATFORM = 'manylinux2014-i686'
|
|
|
|
|
|
elif target == 'linux' and (os.path.isfile("/lib/i386-linux-gnu/libc-2.24.so") or os.path.isfile("/lib/x86_64-linux-gnu/libc-2.24.so")) and os.path.isdir("/opt/python"):
|
|
|
# Same sloppy check for manylinux_2_24.
|
|
|
- if GetTargetArch() in ('x86_64', 'amd64'):
|
|
|
+ if target_arch in ('x86_64', 'amd64'):
|
|
|
PLATFORM = 'manylinux_2_24-x86_64'
|
|
|
- elif GetTargetArch() in ('arm64', 'aarch64'):
|
|
|
+ elif target_arch in ('arm64', 'aarch64'):
|
|
|
PLATFORM = 'manylinux_2_24-aarch64'
|
|
|
else:
|
|
|
PLATFORM = 'manylinux_2_24-i686'
|
|
|
|
|
|
+elif target == 'linux' and os.path.isfile("/lib64/libc-2.28.so") and os.path.isfile('/etc/almalinux-release') and os.path.isdir("/opt/python"):
|
|
|
+ # Same sloppy check for manylinux_2_28.
|
|
|
+ if target_arch in ('x86_64', 'amd64'):
|
|
|
+ PLATFORM = 'manylinux_2_28-x86_64'
|
|
|
+ elif target_arch in ('arm64', 'aarch64'):
|
|
|
+ PLATFORM = 'manylinux_2_28-aarch64'
|
|
|
+ else:
|
|
|
+ raise RuntimeError('Unhandled arch %s, please file a bug report!' % (target_arch))
|
|
|
+
|
|
|
elif not CrossCompiling():
|
|
|
if HasTargetArch():
|
|
|
# Replace the architecture in the platform string.
|
|
|
platform_parts = get_platform().rsplit('-', 1)
|
|
|
- target_arch = GetTargetArch()
|
|
|
if target_arch == 'amd64':
|
|
|
target_arch = 'x86_64'
|
|
|
PLATFORM = platform_parts[0] + '-' + target_arch
|
|
|
@@ -529,7 +538,6 @@ elif not CrossCompiling():
|
|
|
PLATFORM = get_platform()
|
|
|
|
|
|
else:
|
|
|
- target_arch = GetTargetArch()
|
|
|
if target_arch == 'amd64':
|
|
|
target_arch = 'x86_64'
|
|
|
PLATFORM = '{0}-{1}'.format(target, target_arch)
|