From a052c71aec1fcf17ee8da22166ed6258877fb94d Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Wed, 24 Jun 2020 16:50:08 +0100 Subject: [PATCH] Remove hard-coded shell info to use the docker ENTRYPOINT instead This lets us use the 'linux32 bash' that's specified by the i686 docker images, without specifying it explicitly. --- cibuildwheel/docker_container.py | 7 ++----- cibuildwheel/linux.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cibuildwheel/docker_container.py b/cibuildwheel/docker_container.py index 9ba7509d2..66eee1e00 100644 --- a/cibuildwheel/docker_container.py +++ b/cibuildwheel/docker_container.py @@ -26,13 +26,11 @@ class DockerContainer: bash_stdin: IO[str] bash_stdout: IO[str] - def __init__(self, docker_image: str, simulate_32_bit=False): + def __init__(self, docker_image: str): self.docker_image = docker_image - self.simulate_32_bit = simulate_32_bit def __enter__(self) -> 'DockerContainer': self.container_name = f'cibuildwheel-{uuid.uuid4()}' - shell_args = ['linux32', '/bin/bash'] if self.simulate_32_bit else ['/bin/bash'] subprocess.run( [ 'docker', 'create', @@ -40,8 +38,7 @@ def __enter__(self) -> 'DockerContainer': '--name', self.container_name, '-i', '-v', '/:/host', # ignored on CircleCI - self.docker_image, - *shell_args + self.docker_image ], check=True, ) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 30481008d..529e1e5b0 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -110,7 +110,7 @@ def build(options: BuildOptions) -> None: continue try: - with DockerContainer(docker_image, simulate_32_bit=platform_tag.endswith('i686')) as docker: + with DockerContainer(docker_image) as docker: docker.copy_into(Path.cwd(), Path('/project')) if options.before_all: