From d9a317c370f9bbc83d5680f15baf5abbd5258936 Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Mon, 1 Jun 2020 14:30:14 +0100 Subject: [PATCH] fix: address Yannick's PR feedback --- cibuildwheel/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 87d74b30..4706a2a3 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -161,7 +161,7 @@ def main() -> None: # This needs to be passed on to the docker container in linux.py os.environ['CIBUILDWHEEL'] = '1' - if not detect_setup_pyproject_existence(package_dir): + if not is_python_project(package_dir): print('cibuildwheel: Could not find setup.py at root of package', file=sys.stderr) exit(2) @@ -309,7 +309,7 @@ def detect_warnings(platform: str, build_options: BuildOptions) -> List[str]: return warnings -def detect_setup_pyproject_existence(package_dir: str) -> bool: +def is_python_project(package_dir: str) -> bool: return any( os.path.exists(os.path.join(package_dir, name)) for name in ["setup.py", "setup.cfg", "pyproject.toml"]