fix conflicts with main branch

This commit is contained in:
Grzegorz Bokota
2020-01-16 16:10:05 +01:00
parent e64916fe9c
commit 1f784a1a29
2 changed files with 21 additions and 7 deletions
+6 -3
View File
@@ -15,7 +15,8 @@ def test_cpp11(tmp_path):
# this test checks if c++11 standard is supported.
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels('spam', '0.1.0', "10.9") if "cp27-cp27m-win" not in x]
expected_wheels = [x for x in utils.expected_wheels('spam', '0.1.0',
macosx_deployment_target="10.9") if "cp27-cp27m-win" not in x]
assert set(actual_wheels) == set(expected_wheels)
@@ -30,7 +31,8 @@ def test_cpp14():
# this test checks if c++14 standard is supported.
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels('spam', '0.1.0', "10.9")
expected_wheels = [x for x in utils.expected_wheels(
'spam', '0.1.0', macosx_deployment_target="10.9")
if "cp27-cp27m-win" not in x and "cp35-cp35m-win" not in x]
assert set(actual_wheels) == set(expected_wheels)
@@ -49,7 +51,8 @@ def test_cpp17():
# this test checks if c++17 standard is supported.
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels('spam', '0.1.0', "10.13")
expected_wheels = [x for x in utils.expected_wheels('spam', '0.1.0',
macosx_deployment_target="10.13")
if "cp27-cp27m-win" not in x and "cp35-cp35m-win" not in x]
assert set(actual_wheels) == set(expected_wheels)
+15 -4
View File
@@ -66,7 +66,8 @@ 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=['manylinux1', 'manylinux2010'],
macosx_deployment_target=None):
'''
Returns a list of expected wheels from a run of cibuildwheel.
'''
@@ -83,20 +84,30 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu
platform_tags.append('{manylinux_version}_{architecture}'.format(
manylinux_version=manylinux_version, architecture=architecture
))
def get_platform_tags(python_abi_tag):
return platform_tags
elif platform == 'windows':
def get_platform_tags(python_abi_tag):
return ['win32', 'win_amd64']
elif platform == 'macos':
if macosx_deployment_target is not None:
tag = macosx_deployment_target.replace(".", "_")
tag1 = macosx_deployment_target.replace(".", "_")
else:
tag = os.environ.get("MACOSX_DEPLOYMENT_TARGET", "10_6").replace(".", "_")
tag1 = os.environ.get("MACOSX_DEPLOYMENT_TARGET", "10_9").replace(".", "_")
def get_platform_tags(python_abi_tag):
if python_abi_tag == 'cp38-cp38':
return ['macosx_10_9_x86_64']
return ['macosx_' + tag1 + '_x86_64']
else:
return ['macosx_10_6_intel']
return ['macosx_' + tag + '_intel']
else:
raise Exception('unsupported platform')
templates = []
for python_abi_tag in python_abi_tags:
for platform_tag in get_platform_tags(python_abi_tag):