style- inline function
This commit is contained in:
@@ -161,8 +161,9 @@ def main() -> None:
|
|||||||
# This needs to be passed on to the docker container in linux.py
|
# This needs to be passed on to the docker container in linux.py
|
||||||
os.environ['CIBUILDWHEEL'] = '1'
|
os.environ['CIBUILDWHEEL'] = '1'
|
||||||
|
|
||||||
if not is_python_project(package_dir):
|
if not any(os.path.exists(os.path.join(package_dir, name))
|
||||||
print('cibuildwheel: Could not find setup.py at root of package', file=sys.stderr)
|
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)
|
exit(2)
|
||||||
|
|
||||||
if args.print_build_identifiers:
|
if args.print_build_identifiers:
|
||||||
@@ -309,12 +310,5 @@ def detect_warnings(platform: str, build_options: BuildOptions) -> List[str]:
|
|||||||
return warnings
|
return warnings
|
||||||
|
|
||||||
|
|
||||||
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"]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user