Skip to content

Commit

Permalink
Add workaround for setuptools metadata format bug
Browse files Browse the repository at this point in the history
Works around pypa/setuptools#4759 by excluding license files entirely, and instead relying on getting that information from trove classifiers. This fix isn't great, but will probably be overwritten very soon by cookiecutter-snekpack switching over to uv's build backend.
  • Loading branch information
cthoyt authored Dec 8, 2024
1 parent 1884310 commit 03bf2a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions {{cookiecutter.package_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ Documentation = "https://{{cookiecutter.package_name}}.readthedocs.io"

[tool.setuptools]
package-dir = { "" = "src" }
# This fix is here as a final tombstone before getting rid of setuptools and
# replacing with uv's build backend. It appears that the setuptools team hasn't
# prioritized fixing the fully breaking bug in metadata emission described in
# https://github.com/pypa/setuptools/issues/4759. Luckily, the license
# is inferred from the trove classifier for MIT license.
license-files = []

[tool.setuptools.packages.find]
# this implicitly sets `packages = ":find"`
Expand Down

0 comments on commit 03bf2a1

Please sign in to comment.