improv: address Henrii's feedback

Signed-off-by: heitorlessa <lessa@amazon.co.uk>
This commit is contained in:
heitorlessa
2020-06-01 08:37:08 +01:00
parent 4e6246d2a7
commit d41cf65173
+4 -8
View File
@@ -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__':