feat: drop EOL manylinux images (#2316)
* drop EOL manylinux images * chore: use multi-arch manylinux images as a source for image tag Using multi-arch images directly messes with parallel tests for now. Using them as a source for image tag ensures that all architecture specific tags are pointing to the same tag for a given manylinux / musllinux policy. * Apply review suggestion Co-authored-by: Joe Rickerby <joerick@mac.com> --------- Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
parent
3b9c8d4d22
commit
059d8ea25a
@@ -11,7 +11,7 @@ dockcross_only_project = test_projects.new_c_project(
|
||||
import os
|
||||
|
||||
# check that we're running in the correct docker image as specified in the
|
||||
# environment options CIBW_MANYLINUX1_*_IMAGE
|
||||
# environment options CIBW_MANYLINUX_*_IMAGE
|
||||
if "linux" in sys.platform and not os.path.exists("/dockcross"):
|
||||
raise Exception(
|
||||
"/dockcross directory not found. Is this test running in the correct docker image?"
|
||||
|
||||
@@ -19,12 +19,14 @@ def test_python_exist(tmp_path, capfd):
|
||||
basic_project = test_projects.new_c_project()
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
image = f"quay.io/pypa/manylinux2010_{machine}:2022-08-05-4535177"
|
||||
|
||||
with pytest.raises(subprocess.CalledProcessError):
|
||||
utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={
|
||||
"CIBW_MANYLINUX_X86_64_IMAGE": "manylinux2010",
|
||||
"CIBW_MANYLINUX_I686_IMAGE": "manylinux2010",
|
||||
"CIBW_MANYLINUX_X86_64_IMAGE": image,
|
||||
"CIBW_MANYLINUX_I686_IMAGE": image,
|
||||
"CIBW_BUILD": "cp3{10,11}-manylinux*",
|
||||
},
|
||||
)
|
||||
@@ -35,7 +37,6 @@ def test_python_exist(tmp_path, capfd):
|
||||
assert f" to build 'cp310-manylinux_{machine}'." not in captured.err
|
||||
message = (
|
||||
"'/opt/python/cp311-cp311/bin/python' executable doesn't exist"
|
||||
f" in image 'quay.io/pypa/manylinux2010_{machine}:2022-08-05-4535177'"
|
||||
f" to build 'cp311-manylinux_{machine}'."
|
||||
f" in image '{image}' to build 'cp311-manylinux_{machine}'."
|
||||
)
|
||||
assert message in captured.err
|
||||
|
||||
@@ -19,7 +19,7 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
#error "Must run on a glibc linux environment"
|
||||
#endif
|
||||
|
||||
#if !__GLIBC_PREREQ(2, 5) /* manylinux1 is glibc 2.5 */
|
||||
#if !__GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
|
||||
#error "Must run on a glibc >= 2.5 linux environment"
|
||||
#endif
|
||||
|
||||
@@ -46,9 +46,6 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
#elif __GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
|
||||
// secure_getenv is only available in manylinux2014+
|
||||
sts = (int)(intptr_t)secure_getenv("NON_EXISTING_ENV_VARIABLE");
|
||||
#elif __GLIBC_PREREQ(2, 10) /* manylinux2010 is glibc 2.12 */
|
||||
// malloc_info is only available on manylinux2010+
|
||||
sts = malloc_info(0, stdout);
|
||||
#endif
|
||||
"""
|
||||
),
|
||||
@@ -58,10 +55,7 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
@pytest.mark.parametrize(
|
||||
"manylinux_image",
|
||||
[
|
||||
"manylinux1",
|
||||
"manylinux2010",
|
||||
"manylinux2014",
|
||||
"manylinux_2_24",
|
||||
"manylinux_2_28",
|
||||
"manylinux_2_34",
|
||||
],
|
||||
@@ -70,9 +64,6 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
def test(manylinux_image, tmp_path):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("the container image test is only relevant to the linux build")
|
||||
elif platform.machine() not in {"x86_64", "i686"}:
|
||||
if manylinux_image in {"manylinux1", "manylinux2010"}:
|
||||
pytest.skip(f"{manylinux_image} doesn't exist for non-x86 architectures")
|
||||
elif manylinux_image in {"manylinux_2_28", "manylinux_2_34"} and platform.machine() == "i686":
|
||||
pytest.skip(f"{manylinux_image} doesn't exist for i686 architecture")
|
||||
|
||||
@@ -80,7 +71,7 @@ def test(manylinux_image, tmp_path):
|
||||
project_with_manylinux_symbols.generate(project_dir)
|
||||
|
||||
# build the wheels
|
||||
# CFLAGS environment variable is necessary to fail on 'malloc_info' (on manylinux1) during compilation/linking,
|
||||
# CFLAGS environment variable is necessary to fail at build time,
|
||||
# rather than when dynamically loading the Python
|
||||
add_env = {
|
||||
"CIBW_BUILD": "*-manylinux*",
|
||||
@@ -94,15 +85,6 @@ def test(manylinux_image, tmp_path):
|
||||
"CIBW_MANYLINUX_PYPY_AARCH64_IMAGE": manylinux_image,
|
||||
"CIBW_MANYLINUX_PYPY_I686_IMAGE": manylinux_image,
|
||||
}
|
||||
if manylinux_image == "manylinux1":
|
||||
# We don't have a manylinux1 image for PyPy & CPython 3.10 and above
|
||||
add_env["CIBW_SKIP"] = "pp* cp31*"
|
||||
if manylinux_image == "manylinux2010":
|
||||
# We don't have a manylinux2010 image for PyPy 3.9+, CPython 3.11+
|
||||
add_env["CIBW_SKIP"] = "pp39* pp31* cp311* cp312* cp313*"
|
||||
if manylinux_image == "manylinux_2_24":
|
||||
# We don't have a manylinux_2_24 image for PyPy 3.10+, CPython 3.12+
|
||||
add_env["CIBW_SKIP"] = "pp31* cp312* cp313*"
|
||||
if manylinux_image in {"manylinux_2_28", "manylinux_2_34"} and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28+ image for i686
|
||||
add_env["CIBW_ARCHS"] = "x86_64"
|
||||
@@ -113,8 +95,6 @@ def test(manylinux_image, tmp_path):
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
|
||||
|
||||
platform_tag_map = {
|
||||
"manylinux1": ["manylinux_2_5", "manylinux1"],
|
||||
"manylinux2010": ["manylinux_2_12", "manylinux2010"],
|
||||
"manylinux2014": ["manylinux_2_17", "manylinux2014"],
|
||||
}
|
||||
expected_wheels = utils.expected_wheels(
|
||||
@@ -123,29 +103,6 @@ def test(manylinux_image, tmp_path):
|
||||
manylinux_versions=platform_tag_map.get(manylinux_image, [manylinux_image]),
|
||||
musllinux_versions=[],
|
||||
)
|
||||
if manylinux_image == "manylinux1":
|
||||
# remove PyPy & CPython 3.10 and above
|
||||
expected_wheels = [w for w in expected_wheels if "-pp" not in w and "-cp31" not in w]
|
||||
|
||||
if manylinux_image == "manylinux2010":
|
||||
# remove PyPy 3.9+ & CPython 3.11
|
||||
expected_wheels = [
|
||||
w
|
||||
for w in expected_wheels
|
||||
if "-pp39" not in w
|
||||
and "-pp31" not in w
|
||||
and "-cp311" not in w
|
||||
and "-cp312" not in w
|
||||
and "-cp313" not in w
|
||||
]
|
||||
|
||||
if manylinux_image == "manylinux_2_24":
|
||||
# remove PyPy 3.10+ & CPython 3.11 and above
|
||||
expected_wheels = [
|
||||
w
|
||||
for w in expected_wheels
|
||||
if "-pp31" not in w and "-cp312" not in w and "-cp313" not in w
|
||||
]
|
||||
|
||||
if manylinux_image in {"manylinux_2_28", "manylinux_2_34"} and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28+ image for i686
|
||||
|
||||
@@ -24,7 +24,7 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"musllinux_image",
|
||||
["musllinux_1_1", "musllinux_1_2"],
|
||||
["musllinux_1_2"],
|
||||
)
|
||||
@pytest.mark.usefixtures("docker_cleanup")
|
||||
def test(musllinux_image, tmp_path):
|
||||
@@ -36,12 +36,13 @@ def test(musllinux_image, tmp_path):
|
||||
|
||||
# build the wheels
|
||||
add_env = {
|
||||
"CIBW_SKIP": "*-manylinux* *_armv7l",
|
||||
"CIBW_SKIP": "*-manylinux*",
|
||||
"CIBW_MUSLLINUX_X86_64_IMAGE": musllinux_image,
|
||||
"CIBW_MUSLLINUX_I686_IMAGE": musllinux_image,
|
||||
"CIBW_MUSLLINUX_AARCH64_IMAGE": musllinux_image,
|
||||
"CIBW_MUSLLINUX_PPC64LE_IMAGE": musllinux_image,
|
||||
"CIBW_MUSLLINUX_S390X_IMAGE": musllinux_image,
|
||||
"CIBW_MUSLLINUX_ARMV7L_IMAGE": musllinux_image,
|
||||
}
|
||||
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env, single_python=True)
|
||||
@@ -52,5 +53,4 @@ def test(musllinux_image, tmp_path):
|
||||
musllinux_versions=[musllinux_image],
|
||||
single_python=True,
|
||||
)
|
||||
expected_wheels = [w for w in expected_wheels if "armv7l" not in w]
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
@@ -167,10 +167,6 @@ def test_failing_test(tmp_path):
|
||||
add_env={
|
||||
"CIBW_TEST_REQUIRES": "pytest",
|
||||
"CIBW_TEST_COMMAND": f"{utils.invoke_pytest()} {{project}}/test",
|
||||
# manylinux1 has a version of bash that's been shown to have
|
||||
# problems with this, so let's check that.
|
||||
"CIBW_MANYLINUX_I686_IMAGE": "manylinux1",
|
||||
"CIBW_MANYLINUX_X86_64_IMAGE": "manylinux1",
|
||||
# CPython 3.8 when running on macOS arm64 is unusual. The build
|
||||
# always runs in x86_64, so the arm64 tests are not run. See
|
||||
# #1169 for reasons why. That means the build succeeds, which
|
||||
|
||||
Reference in New Issue
Block a user