From b94598e08ba42d3e435afc70d733c51b5a64b9ba Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 11 Oct 2016 19:02:02 +0100 Subject: [PATCH] setup.cfg: add versioneer and bumpversion configurations I had to remove the comments because bumpversion will strip them out anyway upon re-writing the updated version string in setup.cfg file. Similarly, I had to normalize the whitespace like bumpversion would do. :-/ `tag=True` option means a tag is automatically created when bumping the version with bumpversion script. However, in order to get 'annotated' instead of 'lightweight' tags -- i.e. the tag also contains the tag author, date and message --, we need to (temporarily?) use a fork of bumpversion that includes an unmerged PR: https://github.com/peritus/bumpversion/pull/58 --- setup.cfg | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/setup.cfg b/setup.cfg index a096b0b1b..56579d07e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,10 @@ +[bumpversion] +current_version = 3.1.2 +commit = True +tag = True +tag_name = {new_version} +files = Lib/fontTools/__init__.py + [wheel] universal = 1 @@ -9,19 +16,23 @@ test = pytest [tool:pytest] minversion = 2.8 -testpaths = - Lib/fontTools -python_files = - *_test.py -python_classes = - *Test -addopts = - # run py.test in verbose mode - -v - # show extra test summary info - -r a - # run doctests in all .py modules - --doctest-modules - # py.test raises ImportError with inspect.py (requires pygtk) and with - # reportLabPen.py (reportlab). They don't have doctests, it's OK to skip. - --doctest-ignore-import-errors +testpaths = + Lib/fontTools +python_files = + *_test.py +python_classes = + *Test +addopts = + -v + -r a + --doctest-modules + --doctest-ignore-import-errors + +[versioneer] +VCS = git +style = pep440 +versionfile_source = Lib/fontTools/_version.py +versionfile_build = fontTools/_version.py +tag_prefix = +parentdir_prefix = fonttools- +