Skip to content

Commit cf7586c

Browse files
committed
check i686 directly
1 parent 137dc1a commit cf7586c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cibuildwheel/oci_container.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ def __enter__(self) -> OCIContainer:
111111
network_args = ["--network=host"]
112112

113113
simulate_32_bit = self.enforce_32_bit
114-
container_machine = call(
115-
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
116-
).strip()
117-
if container_machine not in {"x86_64", "aarch64"}:
118-
# either the architecture running the image is already the right one
119-
# or the image entrypoint took care of this
120-
simulate_32_bit = False
114+
if self.enforce_32_bit:
115+
# If the architecture running the image is already the right one
116+
# or the image entrypoint takes care of enforcing this, then we don't need to
117+
# simulate this
118+
container_machine = call(
119+
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
120+
).strip()
121+
simulate_32_bit = container_machine != "i686"
121122

122123
shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]
123124

0 commit comments

Comments
 (0)