From d41cf65173cd0897124f92f85c5e0801ab43740b Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Mon, 1 Jun 2020 08:32:35 +0100 Subject: [PATCH] improv: address Henrii's feedback Signed-off-by: heitorlessa --- cibuildwheel/__main__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 9e4e57ae..87d74b30 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -310,14 +310,10 @@ def detect_warnings(platform: str, build_options: BuildOptions) -> List[str]: def detect_setup_pyproject_existence(package_dir: str) -> bool: - exists = False - if os.path.exists(os.path.join(package_dir, 'setup.py')): - exists = True - - if os.path.exists(os.path.join(package_dir, 'pyproject.toml')): - exists = True - - return exists + return any( + os.path.exists(os.path.join(package_dir, name)) + for name in ["setup.py", "setup.cfg", "pyproject.toml"] + ) if __name__ == '__main__':