diff --git a/test/shared/utils.py b/test/shared/utils.py index d0db8b1f..26512995 100644 --- a/test/shared/utils.py +++ b/test/shared/utils.py @@ -5,6 +5,7 @@ This file is added to the PYTHONPATH in the test runner at bin/run_test.py. ''' import os +import platform as pm import shutil import subprocess import sys @@ -70,7 +71,7 @@ def cibuildwheel_run(project_path, env=None, add_env=None, output_dir=None): return wheels -def expected_wheels(package_name, package_version, manylinux_versions=['manylinux1', 'manylinux2010'], +def expected_wheels(package_name, package_version, manylinux_versions=None, macosx_deployment_target=None): ''' Returns a list of expected wheels from a run of cibuildwheel. @@ -79,11 +80,22 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu # {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl # {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 = ['cp27-cp27m', 'cp35-cp35m', 'cp36-cp36m', 'cp37-cp37m', 'cp38-cp38', - 'pp27-pypy_73', 'pp36-pypy36_pp73'] + + + 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': - python_abi_tags.append('cp27-cp27mu') # python 2.7 has 2 different ABI on manylinux - architectures = {'cp': ['x86_64', 'i686'], 'pp': ['x86_64']} + if pm.machine not in ['x86_64', 'i686']: + if manylinux_versions is None: + manylinux_versions = ['manylinux2014'] + architectures = {'cp': [pm.machine]} + else: + if manylinux_versions is None: + manylinux_versions = ['manylinux1', 'manylinux2010'] + python_abi_tags += extra_python_abi_tags + python_abi_tags.append('cp27-cp27mu') # python 2.7 has 2 different ABI on manylinux + architectures = {'cp': ['x86_64', 'i686'], 'pp': ['x86_64']} platform_tags = {} for python_implemention in architectures: platform_tags[python_implemention] = [ @@ -96,12 +108,14 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu def get_platform_tags(python_abi_tag): return platform_tags[python_abi_tag[:2]] elif platform == 'windows': + python_api_tag += 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 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('.', '_'))]