Skip to content

Commit

Permalink
Add manylinux2014 & manylinux_2_24 support for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed May 23, 2021
1 parent 8f7755c commit bb5bf8d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions bin/update_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ class Image(NamedTuple):
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()
Expand Down
10 changes: 6 additions & 4 deletions cibuildwheel/resources/pinned_docker_images.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 2 additions & 2 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.


Expand Down
5 changes: 2 additions & 3 deletions test/test_manylinuxXXXX_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
3 changes: 2 additions & 1 deletion unit_test/main_tests/main_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
],
)
Expand Down

0 comments on commit bb5bf8d

Please sign in to comment.