Adjust tests when running on non-x86
This commit is contained in:
+17
-3
@@ -5,6 +5,7 @@ This file is added to the PYTHONPATH in the test runner at bin/run_test.py.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import platform as pm
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -70,7 +71,7 @@ def cibuildwheel_run(project_path, env=None, add_env=None, output_dir=None):
|
|||||||
return wheels
|
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):
|
macosx_deployment_target=None):
|
||||||
'''
|
'''
|
||||||
Returns a list of expected wheels from a run of cibuildwheel.
|
Returns a list of expected wheels from a run of cibuildwheel.
|
||||||
@@ -79,9 +80,20 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu
|
|||||||
# {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl
|
# {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
|
# {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
|
# 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':
|
if platform == 'linux':
|
||||||
|
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
|
python_abi_tags.append('cp27-cp27mu') # python 2.7 has 2 different ABI on manylinux
|
||||||
architectures = {'cp': ['x86_64', 'i686'], 'pp': ['x86_64']}
|
architectures = {'cp': ['x86_64', 'i686'], 'pp': ['x86_64']}
|
||||||
platform_tags = {}
|
platform_tags = {}
|
||||||
@@ -96,12 +108,14 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu
|
|||||||
def get_platform_tags(python_abi_tag):
|
def get_platform_tags(python_abi_tag):
|
||||||
return platform_tags[python_abi_tag[:2]]
|
return platform_tags[python_abi_tag[:2]]
|
||||||
elif platform == 'windows':
|
elif platform == 'windows':
|
||||||
|
python_api_tag += extra_python_abi_tags
|
||||||
platform_tags = {'cp': ['win32', 'win_amd64'], 'pp': ['win32']}
|
platform_tags = {'cp': ['win32', 'win_amd64'], 'pp': ['win32']}
|
||||||
|
|
||||||
def get_platform_tags(python_abi_tag):
|
def get_platform_tags(python_abi_tag):
|
||||||
return platform_tags[python_abi_tag[:2]]
|
return platform_tags[python_abi_tag[:2]]
|
||||||
|
|
||||||
elif platform == 'macos':
|
elif platform == 'macos':
|
||||||
|
python_api_tag += extra_python_abi_tags
|
||||||
def get_platform_tags(python_abi_tag):
|
def get_platform_tags(python_abi_tag):
|
||||||
default_version = '10.7' if python_abi_tag.startswith('pp') else '10.9'
|
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('.', '_'))]
|
return ['macosx_{}_x86_64'.format((macosx_deployment_target or default_version).replace('.', '_'))]
|
||||||
|
|||||||
Reference in New Issue
Block a user