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
+14
-12
@@ -673,10 +673,18 @@ class Options:
|
||||
)
|
||||
|
||||
def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None:
|
||||
if (
|
||||
value in {"manylinux1", "manylinux2010", "manylinux_2_24", "musllinux_1_1"}
|
||||
and value not in self._image_warnings
|
||||
):
|
||||
error_set = {"manylinux1", "manylinux2010", "manylinux_2_24", "musllinux_1_1"}
|
||||
warning_set: set[str] = set()
|
||||
|
||||
if value in error_set:
|
||||
msg = (
|
||||
f"cibuildwheel 3.x does not support the image {value!r}. Either upgrade to a "
|
||||
"supported image or continue using the image by pinning it directly with"
|
||||
" its full OCI registry '<name>{:<tag>|@<digest>}'."
|
||||
)
|
||||
raise errors.DeprecationError(msg)
|
||||
|
||||
if value in warning_set and value not in self._image_warnings:
|
||||
self._image_warnings.add(value)
|
||||
msg = (
|
||||
f"Deprecated image {value!r}. This value will not work"
|
||||
@@ -783,35 +791,29 @@ class Options:
|
||||
|
||||
for build_platform in MANYLINUX_ARCHS:
|
||||
pinned_images = all_pinned_container_images[build_platform]
|
||||
|
||||
config_value = self.reader.get(
|
||||
f"manylinux-{build_platform}-image", ignore_empty=True
|
||||
)
|
||||
|
||||
self._check_pinned_image(config_value, pinned_images)
|
||||
if not config_value:
|
||||
# default to manylinux2014
|
||||
image = pinned_images["manylinux2014"]
|
||||
elif config_value in pinned_images:
|
||||
self._check_pinned_image(config_value, pinned_images)
|
||||
image = pinned_images[config_value]
|
||||
else:
|
||||
image = config_value
|
||||
|
||||
manylinux_images[build_platform] = image
|
||||
|
||||
for build_platform in MUSLLINUX_ARCHS:
|
||||
pinned_images = all_pinned_container_images[build_platform]
|
||||
|
||||
config_value = self.reader.get(f"musllinux-{build_platform}-image")
|
||||
|
||||
self._check_pinned_image(config_value, pinned_images)
|
||||
if not config_value:
|
||||
image = pinned_images["musllinux_1_2"]
|
||||
elif config_value in pinned_images:
|
||||
self._check_pinned_image(config_value, pinned_images)
|
||||
image = pinned_images[config_value]
|
||||
else:
|
||||
image = config_value
|
||||
|
||||
musllinux_images[build_platform] = image
|
||||
|
||||
container_engine_str = self.reader.get(
|
||||
|
||||
Reference in New Issue
Block a user