corrected as per notations from @YannickJadoul on #113

This commit is contained in:
unknown
2018-11-29 02:44:19 +00:00
parent c4822ebdd6
commit 3d23cbf2a6
6 changed files with 62 additions and 0 deletions
+20
View File
@@ -105,6 +105,26 @@ def main():
# This needs to be passed on to the docker container in linux.py
os.environ['CIBUILDWHEEL'] = '1'
try:
project_setup_py = os.path.join(project_dir, 'setup.py')
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:
if not os.path.exists(project_setup_py):
print('cibuildwheel: Could not find setup.py at root of project', file=sys.stderr)
exit(2)
else:
print(err.output)
print('cibuildwheel: Failed to get name of the package. Command was %s' % err.cmd,
file=sys.stderr)
exit(err.returncode)
if package_name == '' or package_name == 'UNKNOWN':
print('cibuildwheel: Invalid package name "%s". Check your setup.py' % package_name,
file=sys.stderr)
exit(2)
build_options = dict(
project_dir=project_dir,
output_dir=output_dir,
+1
View File
@@ -135,6 +135,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
try:
run_docker(['create',
'--env', 'CIBUILDWHEEL',
'--name', container_name,
'-i',
'-v', '/:/host', # ignored on Circle
docker_image, '/bin/bash'])