Skip to content

Commit e3d065d

Browse files
committed
info: fix incorrect handling sdist inspection
1 parent 8c14ca3 commit e3d065d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/poetry/inspection/info.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,10 @@ def from_directory(cls, path: Path, disable_build: bool = False) -> PackageInfo:
490490
else:
491491
info = cls.from_metadata_directory(path)
492492

493-
if not info or info.requires_dist is None:
493+
# unfortunately, we cannot yet trust that an empty or None requires_dist
494+
# is trustworthy, this is largely due to requirements being not correctly
495+
# populated in PKG-INFO and dynamically generated within setup.py file.
496+
if not info or not info.requires_dist:
494497
try:
495498
if disable_build:
496499
info = cls.from_setup_files(path)

0 commit comments

Comments
 (0)