diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index bf1e6548..c84026be 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -48,19 +48,20 @@ def get_python_configurations(build_selector): for c in python_configurations: if not build_selector(c.identifier): continue - if platform.machine == "x86_64": + pm = platform.machine() + if pm == "x86_64": if c.identifier.endswith('x86_64') or c.identifier.endswith('i686'): configurations.append(c) - if platform.machine == "i686": + if pm == "i686": if c.identifier.endswith('i686'): configuration.append(c) - elif platform.machine == "aarch64": + elif pm == "aarch64": if c.identifier.endswith('aarch64'): configurations.append(c) - elif platform.machine == "ppc64le": + elif pm == "ppc64le": if c.identifier.endswith('ppc64le'): configurations.append(c) - elif platform.machine == "s390x": + elif pm == "s390x": if c.identifier.endswith('s390x'): configurations.append(c) diff --git a/test/shared/utils.py b/test/shared/utils.py index 26512995..056fe6dc 100644 --- a/test/shared/utils.py +++ b/test/shared/utils.py @@ -81,15 +81,14 @@ def expected_wheels(package_name, package_version, manylinux_versions=None, # {python tag} and {abi tag} are closely related to the python interpreter used to build the wheel # so we'll merge them below as python_abi_tag - python_abi_tags = ['cp35-cp35m', 'cp36-cp36m', 'cp37-cp37m', 'cp38-cp38'] extra_python_abi_tags = ['cp27-cp27m', 'pp27-pypy_73', 'pp36-pypy36_pp73'] if platform == 'linux': - if pm.machine not in ['x86_64', 'i686']: + if pm.machine() not in ['x86_64', 'i686']: if manylinux_versions is None: manylinux_versions = ['manylinux2014'] - architectures = {'cp': [pm.machine]} + architectures = {'cp': [pm.machine()]} else: if manylinux_versions is None: manylinux_versions = ['manylinux1', 'manylinux2010'] @@ -108,14 +107,15 @@ def expected_wheels(package_name, package_version, manylinux_versions=None, def get_platform_tags(python_abi_tag): return platform_tags[python_abi_tag[:2]] elif platform == 'windows': - python_api_tag += extra_python_abi_tags + python_abi_tags += extra_python_abi_tags platform_tags = {'cp': ['win32', 'win_amd64'], 'pp': ['win32']} def get_platform_tags(python_abi_tag): return platform_tags[python_abi_tag[:2]] elif platform == 'macos': - python_api_tag += extra_python_abi_tags + python_abi_tags += extra_python_abi_tags + def get_platform_tags(python_abi_tag): default_version = '10.7' if python_abi_tag.startswith('pp') else '10.9' return ['macosx_{}_x86_64'.format((macosx_deployment_target or default_version).replace('.', '_'))]