Skip to content

Commit eb76eda

Browse files
authored
Build: set version dynamically in pyproject.toml (#160)
1 parent c5217fe commit eb76eda

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
To create a new `jax-ai-stack` release, take the following steps:
44

5-
1. Send a pull request updating the version in `pyproject.toml` and
6-
`jax-ai-stack/__init__.py` to the version based on the release date.
5+
1. Send a pull request updating the version in `jax-ai-stack/__init__.py`
6+
to the version based on the release date.
77
Also update `CHANGELOG.md` with the pinned package versions.
88
(an example for the 2024.10.1 release is [PR #50]).
99
2. Once this is merged, create the release tag and push it to github. An

jax_ai_stack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""jax-ai-stack metapackage."""
22

3-
__version__ = "2025.1.9" # keep in sync with pyproject.toml
3+
__version__ = "2025.1.9"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "jax-ai-stack"
3-
version = "2025.1.9" # keep in sync with jax_ai_stack/__init__.py
3+
dynamic = ["version"]
44
description = ""
55
readme = "README.md"
66
license = {file = "LICENSE"}
@@ -65,6 +65,9 @@ requires = [
6565
packages = ["jax_ai_stack"]
6666
include-package-data = false
6767

68+
[tool.setuptools.dynamic]
69+
version = {attr = "jax_ai_stack.__version__"}
70+
6871
[tool.ruff.lint.per-file-ignores]
6972
# F811: Redefinition of unused name.
7073
"docs/source/digits_vae.ipynb" = ["F811"]

0 commit comments

Comments
 (0)