tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.64k stars 512 forks source link

Use setuptools_scm for versioning #474

Closed obestwalter closed 7 years ago

obestwalter commented 7 years ago

This tool hooks into setup.py and provides versioning from e.g. git tags. This makes frequent releases less painful as there is no manual version setting in the sources necessary anymore as this is set and read from git tags.

The default versioning does already what we need for tox versioning.

obestwalter commented 7 years ago

@RonnyPfannschmidt not surprised about your thumbs up here ;) great little tool - thanks for that!

obestwalter commented 7 years ago

I wonder if we might run into this problem: rtfd/readthedocs.org » bad interaction with setuptools_scm. Just leaving this here as a reminder in case there are problems with building the docs.

Will use recommended way to start with.

RonnyPfannschmidt commented 7 years ago

@obestwalter it will help to just use pkg_ressoruces or the version files for then rtd usage

pawamoy commented 7 years ago

Maybe bumpversion could be of interest here.

You can define in .bumpversion.cfg the files in which to search for version tags, and then use the command line tool to update them all at the same time.

It can as well commit the changes and create a git tag automatically.

Here is a typical configuration I use:

[bumpversion]
current_version = 1.0.3
commit = True
tag = True

[bumpversion:file:setup.py]
[bumpversion:file:src/app/__init__.py]
[bumpversion:file:docs/conf.py]
obestwalter commented 7 years ago

@Pawamoy thanks for the tip, but as setuptools_scm is the pypa blessed package to do that and our @RonnyPfannschmidt is the core dev I rather go with that :)

RonnyPfannschmidt commented 7 years ago

one of the reasons i created setuptools_scm and pushed it into pypa is this mess of editing and committing dozens and dozens of files of actual data just to create metadata - when one can just use metadata

nicoddemus commented 7 years ago

Just a note of warning about bumpversion that I just realized yesterday while creating a conda recipe for it: it seems to be largely unmaintained at moment, with lots of PRs sitting there without answer and the last commit to master being from 2015.

obestwalter commented 7 years ago

PRs sitting there without answer and the last commit to master being from 2015.

oh well, another case of maintainer burnout - or just loss of interest.