chore: minor fixups across errors, oci_container, and options (#2860)
* chore: minor fixups across errors, oci_container, and options - Strengthen error message wording: 'is expected to' → 'must' and 'is expected to place one' → 'must place exactly one' in FailedWheelRepairError classes. - Remove shell=True from subprocess.run in oci_container debug_info, passing command as a list instead of a string. - Update pinned image error message from 'cibuildwheel 3.x' to 'cibuildwheel 4.x' and add comment about next warning candidate. Assisted-by: OpenCode:glm-5 * Update cibuildwheel/options.py
This commit is contained in:
@@ -76,7 +76,7 @@ class RepairStepProducedNoWheelError(FatalError):
|
|||||||
Build failed because the repair step completed successfully but
|
Build failed because the repair step completed successfully but
|
||||||
did not produce a wheel.
|
did not produce a wheel.
|
||||||
|
|
||||||
Your `repair-wheel-command` is expected to place the repaired
|
Your `repair-wheel-command` must place the repaired
|
||||||
wheel in the {dest_dir} directory. See the documentation for
|
wheel in the {dest_dir} directory. See the documentation for
|
||||||
example configurations:
|
example configurations:
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ class RepairStepProducedMultipleWheelsError(FatalError):
|
|||||||
Build failed because the repair step completed successfully but
|
Build failed because the repair step completed successfully but
|
||||||
produced multiple wheels: {wheels}
|
produced multiple wheels: {wheels}
|
||||||
|
|
||||||
Your `repair-wheel-command` is expected to place one repaired
|
Your `repair-wheel-command` must place exactly one repaired
|
||||||
wheel in the {{dest_dir}} directory. See the documentation for
|
wheel in the {{dest_dir}} directory. See the documentation for
|
||||||
example configurations:
|
example configurations:
|
||||||
|
|
||||||
|
|||||||
@@ -525,13 +525,12 @@ class OCIContainer:
|
|||||||
return self.call(command, env=environment, capture_output=True)
|
return self.call(command, env=environment, capture_output=True)
|
||||||
|
|
||||||
def debug_info(self) -> str:
|
def debug_info(self) -> str:
|
||||||
|
command = [self.engine.name, "info"]
|
||||||
if self.engine.name == "podman":
|
if self.engine.name == "podman":
|
||||||
command = f"{self.engine.name} info --debug"
|
command.append("--debug")
|
||||||
else:
|
|
||||||
command = f"{self.engine.name} info"
|
|
||||||
completed = subprocess.run(
|
completed = subprocess.run(
|
||||||
command,
|
command,
|
||||||
shell=True,
|
|
||||||
check=True,
|
check=True,
|
||||||
cwd=self.cwd,
|
cwd=self.cwd,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
|
|||||||
@@ -708,11 +708,12 @@ class Options:
|
|||||||
|
|
||||||
def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None:
|
def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None:
|
||||||
error_set = {"manylinux1", "manylinux2010", "manylinux_2_24", "musllinux_1_1"}
|
error_set = {"manylinux1", "manylinux2010", "manylinux_2_24", "musllinux_1_1"}
|
||||||
|
# Currently no warnings, next: https://github.com/pypa/manylinux/issues/1925
|
||||||
warning_set: set[str] = set()
|
warning_set: set[str] = set()
|
||||||
|
|
||||||
if value in error_set:
|
if value in error_set:
|
||||||
msg = (
|
msg = (
|
||||||
f"cibuildwheel 3.x does not support the image {value!r}. Either upgrade to a "
|
f"cibuildwheel 4.x does not support the image {value!r}. Either upgrade to a "
|
||||||
"supported image or continue using the image by pinning it directly with"
|
"supported image or continue using the image by pinning it directly with"
|
||||||
" its full OCI registry '<name>{:<tag>|@<digest>}'."
|
" its full OCI registry '<name>{:<tag>|@<digest>}'."
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user