diff --git a/poetry/core/masonry/builders/builder.py b/poetry/core/masonry/builders/builder.py index b439b4616..78ef49de4 100644 --- a/poetry/core/masonry/builders/builder.py +++ b/poetry/core/masonry/builders/builder.py @@ -113,7 +113,7 @@ def find_excluded_files(self): # type: () -> Set[str] explicitely_included = set() for inc in self._package.include: - included_glob = inc['path'] + included_glob = inc["path"] for included in self._path.glob(str(included_glob)): explicitely_included.add( Path(included).relative_to(self._path).as_posix() diff --git a/tests/masonry/builders/test_wheel.py b/tests/masonry/builders/test_wheel.py index c0cc8c1ce..530680d16 100644 --- a/tests/masonry/builders/test_wheel.py +++ b/tests/masonry/builders/test_wheel.py @@ -96,6 +96,7 @@ def test_wheel_excluded_nested_data(): assert "my_package/public/item1/subitem/subitemdata.txt" not in z.namelist() assert "my_package/public/item2/itemdata2.txt" not in z.namelist() + def test_include_excluded_code(): module_path = fixtures_dir / "include_excluded_code" poetry = Factory().create_poetry(module_path) @@ -109,6 +110,7 @@ def test_include_excluded_code(): assert "my_package/generated.py" in z.namelist() assert "lib/my_package/generated.py" not in z.namelist() + def test_wheel_localversionlabel(): module_path = fixtures_dir / "localversionlabel" project = Factory().create_poetry(module_path) @@ -282,4 +284,3 @@ def test_default_src_with_excluded_data(mocker): assert "my_package/data/data1.txt" in names assert "my_package/data/sub_data/data2.txt" not in names assert "my_package/data/sub_data/data3.txt" in names -