Commit ed19271
committed
Add dynamic versioning to palace-util and palace-opds
Both packages now declare `dynamic = ["version"]` and source the
version from a committed `_version.py` stub via hatchling's regex
version source. The stub carries a dev placeholder (0.0.0.dev0) so
local / developer builds succeed out-of-box; the PyPI publish workflow
overwrites `_version.py` with the dunamai-computed release version
right before `uv build` to get the real version into the wheel
metadata.
`_version.py` also carries `__commit__` and `__branch__` (None on dev,
populated in CI) to match the shape of palace-manager's `_version.py`
— useful for `import palace.util; palace.util.__commit__` style
runtime lookup. Each package's `__init__.py` re-exports the three
attributes; since `_version.py` is committed, no try/except fallback
is needed (palace-manager keeps its try/except only because its
`_version.py` is generated at Docker build time and never committed).
palace-manager's own versioning is unchanged; it's not yet
PyPI-publishable for unrelated reasons.1 parent 11171c1 commit ed19271
7 files changed
Lines changed: 24 additions & 4 deletions
File tree
- packages
- palace-opds
- src/palace/opds
- palace-util
- src/palace/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments