From a8cd8f5e67269f0998ac5a2e53e677c60afc1828 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Tue, 19 Mar 2024 10:26:16 +0100 Subject: [PATCH] Allow dev versions (#2785) * Allow dev versions * More restrictive .dev suffix Dot required, no trailing numbers --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3d2a9ba573..51249e94ae 100644 --- a/setup.py +++ b/setup.py @@ -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