From ec5670a476a735c76de7a1f7d8f8ac9e8d033a37 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 20 Feb 2020 15:59:43 -0500 Subject: [PATCH] Use platform instead of distutils --- cibuildwheel/linux.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index f8801129..bf1e6548 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -1,5 +1,5 @@ -import distutils import os +import platform import shlex import subprocess import sys @@ -48,17 +48,19 @@ def get_python_configurations(build_selector): for c in python_configurations: if not build_selector(c.identifier): continue - platform = distutils.util.get_platform() - if platform == "linux-x86_64": + if platform.machine == "x86_64": if c.identifier.endswith('x86_64') or c.identifier.endswith('i686'): configurations.append(c) - elif platform == "linux-aarch64": + if platform.machine == "i686": + if c.identifier.endswith('i686'): + configuration.append(c) + elif platform.machine == "aarch64": if c.identifier.endswith('aarch64'): configurations.append(c) - elif platform == "linux-ppc64le": + elif platform.machine == "ppc64le": if c.identifier.endswith('ppc64le'): configurations.append(c) - elif platform == "linux-s390x": + elif platform.machine == "s390x": if c.identifier.endswith('s390x'): configurations.append(c)