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)