Skip to content

Commit

Permalink
build: Handle files correctly that aren't packages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kadler committed May 20, 2020
1 parent a2dbe22 commit 64a603d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ authors = [
]
packages = [
{ include = "itoolkit", from = "src" },
# source distribution-only files here:
{ include = "tests", format = "sdist" },
{ include = "samples", format = "sdist" },
{ include = "docs", format = "sdist" },
{ include = "CONTRIBUTING.md", format = "sdist" },
{ include = "contributors.txt", format = "sdist" },
]
include = [
{ path = "tests/*", format = "sdist" },
{ path = "samples/*", format = "sdist" },
{ path = "docs/*", format = "sdist" },
{ path = "setup.cfg", format = "sdist" },
{ path = "CONTRIBUTING.md", format = "sdist" },
{ path = "contributors.txt", format = "sdist" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -39,5 +41,5 @@ mock = "^3.0.5"
bumpversion = "^0.5.0"

[build-system]
requires = ["poetry>=1.0", "setuptools>=39.2"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0a6"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 64a603d

Please sign in to comment.