Support automatic versioning setuptools_scm-style?
See original GitHub issueHi! I’m trying out different packaging solutions because I want to use pyproject.toml
. Poetry looks nice.
What I’m missing is something like setuptools_scm
that lets me ignore the version variable entirely and instead computes it from the git tag. That makes it possible to not litter the commit stream with version-bump commits and release a new version simply by tagging it in GitHub/GitLab.
What do you think?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:33 (1 by maintainers)
Top Results From Across the Web
pypa/setuptools_scm: the blessed package to ... - GitHub
setuptools_scm extracts Python package versions from git or hg metadata instead of declaring them as the version argument or in a SCM managed...
Read more >Versioning your package with setuptools_scm - Moritz Körber
The entry tells build tools that setuptools_scm is required to build the package and, therefore, it gets fetched the isolated environment ...
Read more >Frequently Asked Questions - PyScaffold
Starting from version 4, your package is completely independent from PyScaffold, we just kick-start your project and take care of the boilerplate. However,...
Read more >Is there any practical reason why I must have a code version ...
Technically, you don't have to embed the version in your package. Passing the version to setuptools.setup() will ensure that it will be save ......
Read more >Dependencies Management in Setuptools
There are three types of dependency styles offered by setuptools: 1) build system requirement, 2) required dependency and 3) optional dependency. Each ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the meantime while the plugin system is in progress, I ended up writing a non-setuptools-dependent library to help with doing this, Dunamai, so that you can run
poetry version $(dunamai from git)
to set the version. I hope that it could be a good basis for a plugin too since it doesn’t have any setup.py baggage associated with its implementation.👍 for something like
setuptools_scm
.I find that automated/manual commits of version bumps often lead to tiny annoying conflicts in branches and benign ignore-this-auto-commit rules on CI servers. These problems disappear when version control is tracking the version.
Perhaps, some form of plugin capability for overriding the version string dynamically with arbitrary python code is all that is needed here? Then anyone would likely be able to choose whichever version computation tool that they desire. Be that
setuptools_scm
,vcversioneer
, or something else.I am contemplating taking this on as my first contribution to this project, so please chime in with any helpful tips or design ideas if you have them. Hopefully tacking in the name of a python class to run later in the version field of the toml file would not be too hard. What would others expect here?