Write version file with setuptools-scm #3237
Write version file with setuptools-scm #3237daskol wants to merge 1 commit intogoogle:mainfrom daskol:fix/package-version
setuptools-scm #3237Conversation
Package version in `flax.version` is not updated properly on regular basis. This results in impossible to make a wheel out out git repo (e.g. `SETUPTOOLS_SCM_PRETEND_VERSION=0.7.1 python -m build -nw .`). This commits enables `setuptools-scm` to read configuration from `pyproject.toml` and configures version file.
|
I strongly suggest merging this as well. Getting the version wrong becomes impossible after this. BTW, This will break the current conda-forge recipe, but can be easily fixed. |
|
@PhilipVinc I can't find a conda recipe. Could you share a link to it? |
|
It's here https://github.com/conda-forge/flax-feedstock but don't worry, I'll do it myself. |
|
@chiamp Any comments about "new" 0.7.1 release? Do you understand that all vendored |
|
hi @Dasklol, could you clarify what you mean by "never change release tags"? Every time a release is published, the tag gets updated to reflect the new version number. |
|
I think what he means is that after you tag a commit with a certain version (eg 0.7.1) you should not delete this tag and tag a new commit with the same version (eg 0.7.1). (If you get a release wrong, the PyPi way would be to tag a new version I'm not sure but maybe something like that happened after you tagged 0.7.1 (I think originally you did not update the internal version file...?) |
|
Thanks @PhilipVinc. You precisely expressed my thoughts. I'd like to add that a version (and a version tag) is a kind of a public contract which you as a maintainer is voluntarily obliged to follow. The contract says that anyone at anytime can get exactly the same tarball of source files. There are a lot of tools which is assumed this invariant.
The initial release 0.7.1 was 3741278 then fix at commit 3741278 was merged and published as 0.7.1 again. This broke pipelines due to multiple reasons (checksum change and tarball cache) and affected several users. @chiamp By the way, what is actual reason to have |
|
On the mistaken
Yes - we bump the HEAD version (e.g., with the last release being |
|
Apologies for the trouble - earlier we cut a |
Package version in
flax.versionis not updated properly on regular basis. This results in impossibility to make a wheel out out git repo (e.g.SETUPTOOLS_SCM_PRETEND_VERSION=0.7.1 python -m build -nw .). This commits enablessetuptools-scmto read configuration frompyproject.tomland configure version file.@chiamp Some packaging issues related to the latest release 0.7.1 are solved in this PR.