Commit aad9b53
committed
fix(release): force tag version + strip local identifier in CI
The v0.3.5 publish failed because setuptools-scm produced
"0.3.6.dev0+g7e9e85604.d20260517" instead of "0.3.5":
1. CI checkout is at the tagged commit, but the frontend build step
(`npm run build:viewer`) modifies tracked files before
`python -m build` runs.
2. setuptools-scm sees a dirty tree → bumps to dev0 + adds
"+gHASH.dDATE" local version identifier.
3. PyPI 400s on upload because PEP 440 forbids local version
identifiers on public package indexes.
Two complementary fixes per setuptools-scm's documented best practice:
- `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LLM_EVALUATION_SYSTEM` set from
the git tag in `publish.yml`. Bypasses setuptools-scm's tree
inspection entirely; the version published is exactly the tag value.
- `local_scheme = "no-local-version"` in `pyproject.toml` as defense
in depth — even if a local dev build accidentally produced a wheel
someone tried to upload, the "+gHASH" suffix wouldn't be there to
trip PyPI's PEP 440 check.
Verified locally that setuptools-scm still derives versions correctly
for dev builds; only the PyPI-incompatible suffix is stripped.1 parent 7e9e856 commit aad9b53
2 files changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
0 commit comments