From 7126c1063f143901ee7cc3e04a7f8202fae47095 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 23 May 2021 21:19:15 +0200 Subject: [PATCH] Add manylinux2014 & manylinux_2_24 support for PyPy --- bin/update_docker.py | 2 ++ cibuildwheel/resources/pinned_docker_images.cfg | 10 ++++++---- docs/options.md | 4 ++-- test/test_manylinuxXXXX_only.py | 5 ++--- unit_test/main_tests/main_options_test.py | 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/update_docker.py b/bin/update_docker.py index 169f5150..37e9593f 100755 --- a/bin/update_docker.py +++ b/bin/update_docker.py @@ -31,12 +31,14 @@ images = [ Image("manylinux2014", "aarch64", "quay.io/pypa/manylinux2014_aarch64", None), Image("manylinux2014", "ppc64le", "quay.io/pypa/manylinux2014_ppc64le", None), Image("manylinux2014", "s390x", "quay.io/pypa/manylinux2014_s390x", None), + Image("manylinux2014", "pypy_x86_64", "quay.io/pypa/manylinux2014_x86_64", None), # 2_24 images Image("manylinux_2_24", "x86_64", "quay.io/pypa/manylinux_2_24_x86_64", None), Image("manylinux_2_24", "i686", "quay.io/pypa/manylinux_2_24_i686", None), Image("manylinux_2_24", "aarch64", "quay.io/pypa/manylinux_2_24_aarch64", None), Image("manylinux_2_24", "ppc64le", "quay.io/pypa/manylinux_2_24_ppc64le", None), Image("manylinux_2_24", "s390x", "quay.io/pypa/manylinux_2_24_s390x", None), + Image("manylinux_2_24", "pypy_x86_64", "quay.io/pypa/manylinux_2_24_x86_64", None), ] config = configparser.ConfigParser() diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 25c29f6e..2abcaefa 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -12,16 +12,18 @@ manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2021-05-23-b4fb34d [pypy_x86_64] manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2021-05-23-b4fb34d +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2021-05-23-b4fb34d +manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2021-05-23-b4fb34d [aarch64] manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2021-05-23-b4fb34d -manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-05-23-769ff88 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2021-05-23-b4fb34d [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-05-23-769ff88 -manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-05-23-769ff88 +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2021-05-23-b4fb34d +manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2021-05-23-b4fb34d [s390x] manylinux2014 = quay.io/pypa/manylinux2014_s390x:2021-05-23-b4fb34d -manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-05-23-769ff88 +manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2021-05-23-b4fb34d diff --git a/docs/options.md b/docs/options.md index cf39648b..370b5d32 100644 --- a/docs/options.md +++ b/docs/options.md @@ -479,9 +479,9 @@ The available options are: - `CIBW_MANYLINUX_PPC64LE_IMAGE` - `CIBW_MANYLINUX_S390X_IMAGE` -Set an alternative Docker image to be used for building [manylinux](https://github.com/pypa/manylinux) wheels. cibuildwheel will then pull these instead of the default images, [`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64), [`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686), [`pypywheels/manylinux2010-pypy_x86_64`](https://hub.docker.com/r/pypywheels/manylinux2010-pypy_x86_64), [`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64), [`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le), and [`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2010_s390x). +Set an alternative Docker image to be used for building [manylinux](https://github.com/pypa/manylinux) wheels. cibuildwheel will then pull these instead of the default images, [`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64), [`quay.io/pypa/manylinux2010_i686`](https://quay.io/pypa/manylinux2010_i686), [`quay.io/pypa/manylinux2010_x86_64`](https://quay.io/pypa/manylinux2010_x86_64), [`quay.io/pypa/manylinux2014_aarch64`](https://quay.io/pypa/manylinux2014_aarch64), [`quay.io/pypa/manylinux2014_ppc64le`](https://quay.io/pypa/manylinux2014_ppc64le), and [`quay.io/pypa/manylinux2014_s390x`](https://quay.io/pypa/manylinux2010_s390x). -The value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014` or `manylinux_2_24` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux) and [PyPy manylinux images](https://github.com/pypy/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, only the official `manylinux2010` image is currently available. For architectures other +The value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014` or `manylinux_2_24` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, the `manylinux1` image is not available. For architectures other than x86 (x86\_64 and i686) `manylinux2014` or `manylinux_2_24` must be used, because the first version of the manylinux specification that supports additional architectures is `manylinux2014`. diff --git a/test/test_manylinuxXXXX_only.py b/test/test_manylinuxXXXX_only.py index a406fed4..0776a2f2 100644 --- a/test/test_manylinuxXXXX_only.py +++ b/test/test_manylinuxXXXX_only.py @@ -65,9 +65,8 @@ def test(manylinux_image, tmp_path): "CIBW_MANYLINUX_PPC64LE_IMAGE": manylinux_image, "CIBW_MANYLINUX_S390X_IMAGE": manylinux_image, } - if manylinux_image in {"manylinux1", "manylinux2014", "manylinux_2_24"}: + if manylinux_image in {"manylinux1"}: # We don't have a manylinux1 image for PyPy - # We don't have a manylinux2014 / manylinux_2_24 image for PyPy (yet?) add_env["CIBW_SKIP"] = "pp*" actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) @@ -80,6 +79,6 @@ def test(manylinux_image, tmp_path): 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"}: + if manylinux_image in {"manylinux1"}: expected_wheels = [w for w in expected_wheels if "-pp" not in w] assert set(actual_wheels) == set(expected_wheels) diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 65161ec1..556c2a7b 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -84,7 +84,8 @@ def test_empty_selector(platform, intercepted_build_args, monkeypatch): ("pypy_x86_64", None, "quay.io/pypa/manylinux2010_x86_64:*"), ("pypy_x86_64", "manylinux1", "manylinux1"), # Does not exist ("pypy_x86_64", "manylinux2010", "quay.io/pypa/manylinux2010_x86_64:*"), - ("pypy_x86_64", "manylinux2014", "manylinux2014"), # Does not exist (yet) + ("pypy_x86_64", "manylinux2014", "quay.io/pypa/manylinux2014_x86_64:*"), + ("pypy_x86_64", "manylinux_2_24", "quay.io/pypa/manylinux_2_24_x86_64:*"), ("pypy_x86_64", "custom_image", "custom_image"), ], )