packaging: Fix InvalidVersion in release versions

fixes #1263
pull/1261/head
Alex Willmer 7 months ago
parent fa28024810
commit 4a75648774

@ -27,6 +27,7 @@ In progress (unreleased)
* :gh:issue:`1118` CI: Don't copy SSH private key to temporary dir
* :gh:issue:`1118` CI: Don't share temporary directory between test groupings
* :gh:issue:`1256` CI: Upgrade Github jobs from Ubuntu 20.04 to 22.04 & 24.04
* :gh:issue:`1263` packaging: Fix InvalidVersion in release versions
v0.3.22 (2025-02-04)

@ -41,7 +41,8 @@ def grep_version():
match = version_pattern.search(fp.read())
if match is None:
raise ValueError('Could not find __version__ string in %s', path)
return '.'.join(str(part) for part in match.groups())
# E.g. '0.1.2', '0.1.3dev'
return '.'.join(str(part) for part in match.groups() if part)
def long_description():

Loading…
Cancel
Save