Skip to content

Commit

Permalink
Allow dev versions (#2785)
Browse files Browse the repository at this point in the history
* Allow dev versions

* More restrictive .dev suffix

Dot required, no trailing numbers
  • Loading branch information
heerener committed Mar 19, 2024
1 parent 35ced5d commit a8cd8f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -92,7 +92,7 @@ class Components:

# if version is not a valid PEP440 version, then create a bogus version
# that will be used only for development purposes which appends the commit hash
if not re.match(r"^\d+(\.\d+)*$", __version__):
if not re.match(r"^\d+(\.\d+)*(\.dev)?$", __version__):
__version__ = "0.0.dev0+g" + (
subprocess.run(
["git", "rev-parse", "--short", "HEAD"], stdout=subprocess.PIPE
Expand Down

0 comments on commit a8cd8f5

Please sign in to comment.