From 31ac2ba03fabba444abe97835a9c56c050db47e7 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 13 Apr 2017 14:22:27 +0100 Subject: [PATCH] Fix compatibility with setup_requires --- cibuildwheel/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index c574b442..79509dd7 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -76,7 +76,9 @@ def main(): try: project_setup_py = os.path.join(project_dir, 'setup.py') - package_name = subprocess.check_output([sys.executable, project_setup_py, '--name']) + name_output = subprocess.check_output([sys.executable, project_setup_py, '--name']) + # 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) @@ -86,8 +88,6 @@ def main(): file=sys.stderr) exit(2) - package_name = package_name.strip() - if package_name == '' or package_name == 'UNKNOWN': print('cibuildwheel: Invalid package name "%s". Check your setup.py' % package_name, file=sys.stderr)