Use the ARCHS option to select universal2/arm64 builds

This commit is contained in:
Joe Rickerby
2021-01-05 15:14:32 +00:00
parent e405f3495e
commit df60457001
5 changed files with 83 additions and 22 deletions
+25
View File
@@ -0,0 +1,25 @@
import pytest
from . import test_projects, utils
basic_project = test_projects.new_c_project()
def test_cross_compiled_build(tmp_path):
if utils.platform != 'macos':
pytest.skip('this test is only relevant to macos')
project_dir = tmp_path / 'project'
basic_project.generate(project_dir)
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
'CIBW_ARCHS': 'x86_64, universal2, arm64',
})
expected_wheels = (
utils.expected_wheels('spam', '0.1.0', machine_arch='x86_64')
+ utils.expected_wheels('spam', '0.1.0', machine_arch='arm64')
)
assert set(actual_wheels) == set(expected_wheels)
# TODO: add a TEST_COMMAND test when using cross-compiling