diff --git a/src/pdm/backend/base.py b/src/pdm/backend/base.py index 31a079f..e4a75b8 100644 --- a/src/pdm/backend/base.py +++ b/src/pdm/backend/base.py @@ -286,7 +286,8 @@ def find_license_files(self, metadata: StandardMetadata) -> list[str]: ): # no license files specified, find from default patterns for backward compatibility for pattern in ["LICEN[CS]E*", "COPYING*", "NOTICE*"]: for path in self.location.glob(pattern): - result.append(path.relative_to(self.location).as_posix()) + if path.is_file(): + result.append(path.relative_to(self.location).as_posix()) return result def _get_include_and_exclude(self) -> tuple[set[str], set[str]]: