Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update expected wheels when using auditwheel >= 4 #633

Merged
merged 3 commits into from
May 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def build(options: BuildOptions) -> None:
log.build_start(config.identifier)

dependency_constraint_flags: List[PathOrStr] = []
if config.identifier.startswith("pp"):
if config.identifier.startswith("pp36"):
# Patch PyPy to make sure headers get installed into a venv
patch_path = resources_dir / "pypy_venv.patch"
patch_docker_path = PurePath("/pypy_venv.patch")
Expand Down
16 changes: 8 additions & 8 deletions cibuildwheel/resources/build-platforms.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ python_configurations = [
python_configurations = [
{ identifier = "cp36-macosx_x86_64", version = "3.6", url = "https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg" },
{ identifier = "cp37-macosx_x86_64", version = "3.7", url = "https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg" },
{ identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.9/python-3.8.9-macosx10.9.pkg" },
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" },
{ identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg" },
{ identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
{ identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
{ identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" },
{ identifier = "pp36-macosx_x86_64", version = "3.6", url = "https://downloads.python.org/pypy/pypy3.6-v7.3.3-osx64.tar.bz2" },
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.3-osx64.tar.bz2" },
]
Expand All @@ -42,10 +42,10 @@ python_configurations = [
{ identifier = "cp36-win_amd64", version = "3.6.8", arch = "64" },
{ identifier = "cp37-win32", version = "3.7.9", arch = "32" },
{ identifier = "cp37-win_amd64", version = "3.7.9", arch = "64" },
{ identifier = "cp38-win32", version = "3.8.9", arch = "32" },
{ identifier = "cp38-win_amd64", version = "3.8.9", arch = "64" },
{ identifier = "cp39-win32", version = "3.9.4", arch = "32" },
{ identifier = "cp39-win_amd64", version = "3.9.4", arch = "64" },
{ identifier = "cp38-win32", version = "3.8.10", arch = "32" },
{ identifier = "cp38-win_amd64", version = "3.8.10", arch = "64" },
{ identifier = "cp39-win32", version = "3.9.5", arch = "32" },
{ identifier = "cp39-win_amd64", version = "3.9.5", arch = "64" },
{ identifier = "pp36-win32", version = "3.6", arch = "32", url = "https://downloads.python.org/pypy/pypy3.6-v7.3.3-win32.zip" },
{ identifier = "pp37-win32", version = "3.7", arch = "32", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.3-win32.zip" },
]
12 changes: 6 additions & 6 deletions cibuildwheel/resources/constraints-python36.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
importlib-metadata==3.10.0
importlib-metadata==4.0.1
# via virtualenv
importlib-resources==5.1.2
# via virtualenv
six==1.15.0
six==1.16.0
# via virtualenv
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via importlib-metadata
virtualenv==20.4.3
virtualenv==20.4.6
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
Expand All @@ -32,7 +32,7 @@ zipp==3.4.1
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
pip==21.1.1
# via -r cibuildwheel/resources/constraints.in
setuptools==54.2.0
setuptools==56.1.0
# via -r cibuildwheel/resources/constraints.in
12 changes: 6 additions & 6 deletions cibuildwheel/resources/constraints-python37.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
importlib-metadata==3.10.0
importlib-metadata==4.0.1
# via virtualenv
six==1.15.0
six==1.16.0
# via virtualenv
typing-extensions==3.7.4.3
typing-extensions==3.10.0.0
# via importlib-metadata
virtualenv==20.4.3
virtualenv==20.4.6
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
Expand All @@ -28,7 +28,7 @@ zipp==3.4.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
pip==21.1.1
# via -r cibuildwheel/resources/constraints.in
setuptools==54.2.0
setuptools==56.1.0
# via -r cibuildwheel/resources/constraints.in
8 changes: 4 additions & 4 deletions cibuildwheel/resources/constraints-python38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
six==1.15.0
six==1.16.0
# via virtualenv
virtualenv==20.4.3
virtualenv==20.4.6
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
# -r cibuildwheel/resources/constraints.in
# delocate

# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
pip==21.1.1
# via -r cibuildwheel/resources/constraints.in
setuptools==54.2.0
setuptools==56.1.0
# via -r cibuildwheel/resources/constraints.in
8 changes: 4 additions & 4 deletions cibuildwheel/resources/constraints-python39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
six==1.15.0
six==1.16.0
# via virtualenv
virtualenv==20.4.3
virtualenv==20.4.6
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
# -r cibuildwheel/resources/constraints.in
# delocate

# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
pip==21.1.1
# via -r cibuildwheel/resources/constraints.in
setuptools==54.2.0
setuptools==56.1.0
# via -r cibuildwheel/resources/constraints.in
8 changes: 4 additions & 4 deletions cibuildwheel/resources/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ distlib==0.3.1
# via virtualenv
filelock==3.0.12
# via virtualenv
six==1.15.0
six==1.16.0
# via virtualenv
virtualenv==20.4.3
virtualenv==20.4.6
# via -r cibuildwheel/resources/constraints.in
wheel==0.36.2
# via
# -r cibuildwheel/resources/constraints.in
# delocate

# The following packages are considered to be unsafe in a requirements file:
pip==21.0.1
pip==21.1.1
# via -r cibuildwheel/resources/constraints.in
setuptools==54.2.0
setuptools==56.1.0
# via -r cibuildwheel/resources/constraints.in
30 changes: 15 additions & 15 deletions cibuildwheel/resources/pinned_docker_images.cfg
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[x86_64]
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-04-05-14df3a6
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-04-05-b4fd19d
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-04-05-b4fd19d
manylinux1 = quay.io/pypa/manylinux1_x86_64:2021-05-06-1b0c111
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-05-05-e1501b7
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-05-05-e1501b7
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-05-05-e1501b7

[i686]
manylinux1 = quay.io/pypa/manylinux1_i686:2021-04-05-14df3a6
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-04-05-b4fd19d
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-04-05-b4fd19d
manylinux1 = quay.io/pypa/manylinux1_i686:2021-05-06-1b0c111
manylinux2010 = quay.io/pypa/manylinux2010_i686:2021-05-05-e1501b7
manylinux2014 = quay.io/pypa/manylinux2014_i686:2021-05-05-e1501b7
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-05-05-e1501b7

[pypy_x86_64]
manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-12-11-f1e0e80
manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2021-05-08-8650a6d

[aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-04-05-b4fd19d
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-05-05-e1501b7
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-05-05-e1501b7

[ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-04-05-b4fd19d
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-05-05-e1501b7
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-05-05-e1501b7

[s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-04-05-b4fd19d
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-04-05-b4fd19d
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-05-05-e1501b7
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-05-05-e1501b7

13 changes: 1 addition & 12 deletions test/test_0_basic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform
import textwrap

import pytest
Expand Down Expand Up @@ -53,16 +52,6 @@ def test_build_identifiers(tmp_path):

# check that the number of expected wheels matches the number of build
# identifiers
# after adding CIBW_MANYLINUX_IMAGE to support manylinux2010, there
# can be multiple wheels for each wheel, though, so we need to limit
# the expected wheels
if platform.machine() in ["x86_64", "i686"]:
expected_wheels = [
w
for w in utils.expected_wheels("spam", "0.1.0")
if "-manylinux" not in w or "-manylinux1" in w
]
else:
expected_wheels = utils.expected_wheels("spam", "0.1.0")
expected_wheels = utils.expected_wheels("spam", "0.1.0")
build_identifiers = utils.cibuildwheel_get_build_identifiers(project_dir)
assert len(expected_wheels) == len(build_identifiers)
8 changes: 7 additions & 1 deletion test/test_docker_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ def test(tmp_path):
)

# also check that we got the right wheels built
# there's no auditwheel 4+ on dockcross image
# remove manylinux1 wheels from the list of actual_wheels
# and restrict expected_wheels to manylinux2010 wheels
actual_wheels = [w for w in actual_wheels if "-manylinux1" not in w]
expected_wheels = [
w for w in utils.expected_wheels("spam", "0.1.0") if "-pp" not in w and "-cp39-" not in w
w
for w in utils.expected_wheels("spam", "0.1.0", manylinux_versions=["manylinux2010"])
if "-pp" not in w and "-cp39-" not in w
]
assert set(actual_wheels) == set(expected_wheels)
11 changes: 8 additions & 3 deletions test/test_manylinuxXXXX_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ def test(manylinux_image, tmp_path):

actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)

expected_wheels = [
w for w in utils.expected_wheels("spam", "0.1.0", manylinux_versions=[manylinux_image])
]
platform_tag_map = {
"manylinux1": ["manylinux_2_5", "manylinux1"],
"manylinux2010": ["manylinux_2_12", "manylinux2010"],
"manylinux2014": ["manylinux_2_17", "manylinux2014"],
}
expected_wheels = utils.expected_wheels(
"spam", "0.1.0", manylinux_versions=platform_tag_map.get(manylinux_image, [manylinux_image])
)
if manylinux_image in {"manylinux1", "manylinux2014", "manylinux_2_24"}:
expected_wheels = [w for w in expected_wheels if "-pp" not in w]
assert set(actual_wheels) == set(expected_wheels)
12 changes: 8 additions & 4 deletions test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def expected_wheels(

if manylinux_versions is None:
if machine_arch == "x86_64":
manylinux_versions = ["manylinux1", "manylinux2010"]
manylinux_versions = ["manylinux_2_5", "manylinux1", "manylinux_2_12", "manylinux2010"]
else:
manylinux_versions = ["manylinux2014"]
manylinux_versions = ["manylinux_2_17", "manylinux2014"]

python_abi_tags = ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39"]

Expand Down Expand Up @@ -144,9 +144,13 @@ def expected_wheels(
architectures.append("i686")

platform_tags = [
f"{manylinux_version}_{architecture}"
".".join(
[
f"{manylinux_version}_{architecture}"
for manylinux_version in manylinux_versions
]
)
for architecture in architectures
for manylinux_version in manylinux_versions
]

elif platform == "windows":
Expand Down