Updated preset values for CIBW_MANYLINUX_*_IMAGE, fixed skip message in 08_manylinux2010_only test, and added clarifying comment on multiple wheels in Linux bash script
This commit is contained in:
@@ -147,9 +147,12 @@ def main():
|
||||
manylinux_x86_64_image = os.environ.get('CIBW_MANYLINUX_X86_64_IMAGE', '2010')
|
||||
manylinux_i686_image = os.environ.get('CIBW_MANYLINUX_I686_IMAGE', '')
|
||||
|
||||
default_manylinux_images_x86_64 = {'1': 'quay.io/pypa/manylinux1_x86_64',
|
||||
'2010': 'quay.io/pypa/manylinux2010_x86_64'}
|
||||
default_manylinux_images_i686 = {'1': 'quay.io/pypa/manylinux1_i686'}
|
||||
manylinux_x86_64_image = os.environ.get('CIBW_MANYLINUX_X86_64_IMAGE', 'manylinux2010')
|
||||
manylinux_i686_image = os.environ.get('CIBW_MANYLINUX_I686_IMAGE', '')
|
||||
|
||||
default_manylinux_images_x86_64 = {'manylinux1': 'quay.io/pypa/manylinux1_x86_64',
|
||||
'manylinux2010': 'quay.io/pypa/manylinux2010_x86_64'}
|
||||
default_manylinux_images_i686 = {'manylinux1': 'quay.io/pypa/manylinux1_i686'}
|
||||
|
||||
build_options.update(
|
||||
manylinux_images={'x86_64': default_manylinux_images_x86_64.get(manylinux_x86_64_image) or manylinux_x86_64_image,
|
||||
|
||||
@@ -102,6 +102,11 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
||||
echo "Running tests using `which python`"
|
||||
|
||||
# Install the wheel we just built
|
||||
# Note: If auditwheel produced two wheels, it's because the earlier produced wheel
|
||||
# conforms to multiple manylinux standards. These multiple versions of the wheel are
|
||||
# functionally the same, differing only in name, wheel metadata, and possibly include
|
||||
# different external shared libraries. so it doesn't matter which one we run the tests on.
|
||||
# Let's just pick the first one.
|
||||
pip install "${{delocated_wheels[0]}}"{test_extras}
|
||||
|
||||
# Install any requirements to run the tests
|
||||
|
||||
@@ -5,7 +5,7 @@ def test():
|
||||
project_dir = os.path.dirname(__file__)
|
||||
|
||||
if utils.platform != 'linux':
|
||||
pytest.skip('the docker test is only relevant to the linux build')
|
||||
pytest.skip('the test is only relevant to the linux build')
|
||||
|
||||
utils.cibuildwheel_run(project_dir, add_env={
|
||||
'CIBW_MANYLINUX_X86_64_IMAGE': 'dockcross/manylinux2010-x64',
|
||||
@@ -15,6 +15,6 @@ def test():
|
||||
})
|
||||
|
||||
# also check that we got the right wheels built
|
||||
expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'1_x86_64', '2010_x86_64', '1_i686'})
|
||||
expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'manylinux1_x86_64', 'manylinux2010_x86_64', 'manylinux1_i686'})
|
||||
actual_wheels = os.listdir('wheelhouse')
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
@@ -15,6 +15,6 @@ def test():
|
||||
})
|
||||
|
||||
# also check that we got the right wheels
|
||||
expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'2010_x86_64'})
|
||||
expected_wheels = utils.expected_wheels('spam', '0.1.0', manylinux_versions={'manylinux2010_x86_64'})
|
||||
actual_wheels = os.listdir('wheelhouse')
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
@@ -42,13 +42,13 @@ def cibuildwheel_run(project_path, env=None, add_env=None):
|
||||
)
|
||||
|
||||
|
||||
def expected_wheels(package_name, package_version, manylinux_versions={'1_x86_64', '2010_x86_64'}):
|
||||
def expected_wheels(package_name, package_version, manylinux_versions={'manylinux1_x86_64', 'manylinux2010_x86_64'}):
|
||||
'''
|
||||
Returns a list of expected wheels from a run of cibuildwheel.
|
||||
'''
|
||||
if platform == 'linux':
|
||||
templates = []
|
||||
if '1_x86_64' in manylinux_versions:
|
||||
if 'manylinux1_x86_64' in manylinux_versions:
|
||||
templates += [
|
||||
'{package_name}-{package_version}-cp27-cp27m-manylinux1_x86_64.whl',
|
||||
'{package_name}-{package_version}-cp27-cp27mu-manylinux1_x86_64.whl',
|
||||
@@ -57,7 +57,7 @@ def expected_wheels(package_name, package_version, manylinux_versions={'1_x86_64
|
||||
'{package_name}-{package_version}-cp36-cp36m-manylinux1_x86_64.whl',
|
||||
'{package_name}-{package_version}-cp37-cp37m-manylinux1_x86_64.whl',
|
||||
]
|
||||
if '1_i686' in manylinux_versions:
|
||||
if 'manylinux1_i686' in manylinux_versions:
|
||||
templates += [
|
||||
'{package_name}-{package_version}-cp27-cp27m-manylinux1_i686.whl',
|
||||
'{package_name}-{package_version}-cp27-cp27mu-manylinux1_i686.whl',
|
||||
@@ -66,7 +66,7 @@ def expected_wheels(package_name, package_version, manylinux_versions={'1_x86_64
|
||||
'{package_name}-{package_version}-cp36-cp36m-manylinux1_i686.whl',
|
||||
'{package_name}-{package_version}-cp37-cp37m-manylinux1_i686.whl',
|
||||
]
|
||||
if '2010_x86_64' in manylinux_versions:
|
||||
if 'manylinux2010_x86_64' in manylinux_versions:
|
||||
templates += [
|
||||
'{package_name}-{package_version}-cp27-cp27m-manylinux2010_x86_64.whl',
|
||||
'{package_name}-{package_version}-cp27-cp27mu-manylinux2010_x86_64.whl',
|
||||
|
||||
Reference in New Issue
Block a user