File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -269,18 +269,15 @@ def tabulate(rows):
269
269
return table , sizes
270
270
271
271
272
- def is_installable_dir (path ) :
273
- # type: (str) -> bool
274
- """Is path is a directory containing setup.py or pyproject.toml?"""
272
+ def is_installable_dir (path : str ) -> bool :
273
+ """Is path is a directory containing pyproject.toml, setup.cfg or setup.py?
274
+ """
275
275
if not os .path .isdir (path ):
276
276
return False
277
- setup_py = os .path .join (path , "setup.py" )
278
- if os .path .isfile (setup_py ):
279
- return True
280
- pyproject_toml = os .path .join (path , "pyproject.toml" )
281
- if os .path .isfile (pyproject_toml ):
282
- return True
283
- return False
277
+ return any (
278
+ os .path .isfile (os .path .join (path , signifier ))
279
+ for signifier in ("pyproject.toml" , "setup.cfg" , "setup.py" )
280
+ )
284
281
285
282
286
283
def read_chunks (file , size = io .DEFAULT_BUFFER_SIZE ):
You can’t perform that action at this time.
0 commit comments