diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index bc21fbe64..95bc96b93 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -161,8 +161,9 @@ def main() -> None: # This needs to be passed on to the docker container in linux.py os.environ['CIBUILDWHEEL'] = '1' - if not os.path.exists(os.path.join(package_dir, 'setup.py')): - print('cibuildwheel: Could not find setup.py at root of package', file=sys.stderr) + if not any(os.path.exists(os.path.join(package_dir, name)) + for name in ["setup.py", "setup.cfg", "pyproject.toml"]): + print('cibuildwheel: Could not find setup.py, setup.cfg or pyproject.toml at root of package', file=sys.stderr) exit(2) if args.print_build_identifiers: