Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def main():

try:
project_setup_py = os.path.join(project_dir, 'setup.py')
name_output = subprocess.check_output([sys.executable, project_setup_py, '--name'])
name_output = subprocess.check_output([sys.executable, project_setup_py, '--name'],
universal_newlines=True)
# the last line of output is the name
package_name = name_output.strip().splitlines()[-1]
except subprocess.CalledProcessError as err:
Expand Down
8 changes: 7 additions & 1 deletion cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be

for platform_tag, docker_image in platforms:
platform_configs = [c for c in python_configurations if c.identifier.endswith(platform_tag)]
if not platform_configs:
continue

bash_script = '''
set -o errexit
Expand Down Expand Up @@ -113,7 +115,11 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
'/bin/bash'],
stdin=subprocess.PIPE, universal_newlines=True)

docker_process.communicate(bash_script)
try:
docker_process.communicate(bash_script)
except KeyboardInterrupt:
docker_process.kill()
docker_process.wait()

if docker_process.returncode != 0:
exit(1)