diff --git a/poetry/core/masonry/builders/builder.py b/poetry/core/masonry/builders/builder.py index bb5988a26..9cc702458 100644 --- a/poetry/core/masonry/builders/builder.py +++ b/poetry/core/masonry/builders/builder.py @@ -96,7 +96,7 @@ def find_excluded_files(self): # type: () -> Set[str] explicitely_excluded = set() for excluded_glob in self._package.exclude: - for excluded in self._path.glob(excluded_glob): + for excluded in self._path.glob(str(excluded_glob)): explicitely_excluded.add( Path(excluded).relative_to(self._path).as_posix() ) diff --git a/tests/masonry/builders/fixtures/complete/pyproject.toml b/tests/masonry/builders/fixtures/complete/pyproject.toml index 13834964e..d6455b7dd 100644 --- a/tests/masonry/builders/fixtures/complete/pyproject.toml +++ b/tests/masonry/builders/fixtures/complete/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ ] exclude = [ + "does-not-exist", "**/*.xml" ]