question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support automatic versioning setuptools_scm-style?

See original GitHub issue

Hi! 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:closed
  • Created 5 years ago
  • Reactions:35
  • Comments:33 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
mtkennerlycommented, Mar 29, 2019

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.

6reactions
kevinkjt2000commented, Nov 5, 2018

👍 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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found