From 1fcdc18762fa04b55aad92f9658a062a98fb30a9 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 17 May 2021 09:47:45 +0200 Subject: [PATCH] Tiny fix in find_pypi_tag.py --- python/find_pypi_tag.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/find_pypi_tag.py b/python/find_pypi_tag.py index 571ec1a4819..924c75096fa 100644 --- a/python/find_pypi_tag.py +++ b/python/find_pypi_tag.py @@ -37,8 +37,9 @@ def parse_cmake_version_info(): m = re.search(r'set\(PROJECT_VERSION_PRERELEASE \"(.*?)\"\)', content) pre_release = '' if m: - pre_release = m.groups()[0] - v += f".{pre_release}" + pre_release = m.groups()[0].strip() + if pre_release: + v += f".{pre_release}" return version.Version(v)