Skip to content

Commit 64a603d

Browse files
committed
build: Handle files correctly that aren't packages
We want to ship various files in the source distribution, but they are not packages. Including them in the packages option of poetry seemed to work for building the sdist and wheels, but it broke poetry install. The correct way to do this was implemented in Poetry with python-poetry/poetry-core#6. This fix is in an as-yet unreleased version, unfortunately.
1 parent a2dbe22 commit 64a603d

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ authors = [
1313
]
1414
packages = [
1515
{ include = "itoolkit", from = "src" },
16-
# source distribution-only files here:
17-
{ include = "tests", format = "sdist" },
18-
{ include = "samples", format = "sdist" },
19-
{ include = "docs", format = "sdist" },
20-
{ include = "CONTRIBUTING.md", format = "sdist" },
21-
{ include = "contributors.txt", format = "sdist" },
16+
]
17+
include = [
18+
{ path = "tests/*", format = "sdist" },
19+
{ path = "samples/*", format = "sdist" },
20+
{ path = "docs/*", format = "sdist" },
21+
{ path = "setup.cfg", format = "sdist" },
22+
{ path = "CONTRIBUTING.md", format = "sdist" },
23+
{ path = "contributors.txt", format = "sdist" },
2224
]
2325
classifiers = [
2426
"Development Status :: 5 - Production/Stable",
@@ -39,5 +41,5 @@ mock = "^3.0.5"
3941
bumpversion = "^0.5.0"
4042

4143
[build-system]
42-
requires = ["poetry>=1.0", "setuptools>=39.2"]
43-
build-backend = "poetry.masonry.api"
44+
requires = ["poetry-core>=1.0.0a6"]
45+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)