Skip to content

Commit

Permalink
Configure uv to use git commits and tags in cache key (#86)
Browse files Browse the repository at this point in the history
This is another attempt to make setuptools-scm work as intended when using
the publish to test-pypi workflow. We previously configured setuptools-scm
to generate PEP 440-compliant version numbers, and that change enabled a
successful push to test-pypi.

However, the version number generated by setuptools-scm did not respect the
most recent tagged release of Cladetime (v.0.2.3), and assigned a version number
of cladetime-0.1.dev1 rather than the expected v.0.2.4.dev[somenumber]

The changeset follows uv guidance for using setuptools-scm/dynamic metadata:
https://docs.astral.sh/uv/concepts/cache/#dynamic-metadata
  • Loading branch information
bsweger authored Jan 10, 2025
1 parent 26b0eb8 commit 1b41960
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,8 @@ lint.extend-select = ["I"]
[tool.mypy]
ignore_missing_imports = false

[tool.uv]
# ensure setuptools_scm generates a version number that reflects latest tags
# https://docs.astral.sh/uv/concepts/cache/#dynamic-metadata
cache-keys = [{ git = { commit = true, tags = true } }]

0 comments on commit 1b41960

Please sign in to comment.