From ea1d81ee412e6cd86d408315a43fbd6540a003e2 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 30 Jul 2018 11:16:52 +0200 Subject: [PATCH] fix #292 - support for uppercase leading v character in tag version extraction regex --- CHANGELOG.rst | 11 +++++++++++ src/setuptools_scm/config.py | 2 +- testing/test_config.py | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 93af89ad..3cc13967 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,14 @@ +v3.0.5 + +* fix #292 - match leading 'V' character as well + + https://www.python.org/dev/peps/pep-0440/#preceding-v-character + +v3.0.4 +======= + +* rerelease of 3.0.3 after fixing the release process + v3.0.3 (pulled from pypi due to a packaging issue) ====== diff --git a/src/setuptools_scm/config.py b/src/setuptools_scm/config.py index b1c07f85..f62f467d 100644 --- a/src/setuptools_scm/config.py +++ b/src/setuptools_scm/config.py @@ -6,7 +6,7 @@ from .utils import trace -DEFAULT_TAG_REGEX = r"^(?:[\w-]+-)?(?Pv?\d+(?:\.\d+){0,2}[^\+]+)(?:\+.*)?$" +DEFAULT_TAG_REGEX = r"^(?:[\w-]+-)?(?P[vV]?\d+(?:\.\d+){0,2}[^\+]+)(?:\+.*)?$" DEFAULT_VERSION_SCHEME = "version_scheme" diff --git a/testing/test_config.py b/testing/test_config.py index 89181b8c..eadbaf3d 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -9,6 +9,8 @@ ("apache-arrow-0.9.0", "0.9.0"), ("arrow-0.9.0", "0.9.0"), ("arrow-0.9.0-rc", "0.9.0-rc"), + ("v1.1", "v1.1"), + ("V1.1", "V1.1"), ], ) def test_tag_regex(tag, expected_version):