From 8221be3a8ce6177545478720fc2e776eb0737242 Mon Sep 17 00:00:00 2001 From: Vishesh Date: Thu, 13 Jun 2024 11:29:51 +0530 Subject: [PATCH] Fix marvin package version while building packages (#9230) --- tools/marvin/mvn-setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/marvin/mvn-setup.py b/tools/marvin/mvn-setup.py index 61bd2219238..cabcf0dc659 100755 --- a/tools/marvin/mvn-setup.py +++ b/tools/marvin/mvn-setup.py @@ -34,6 +34,8 @@ def replaceVersion(fname, version): with open(fname, 'r') as f: content = f.read() needle = '\nVERSION\s*=\s*[\'"][^\'"]*[\'"]' + # Ensure the version is PEP440 compliant + version = version.replace('-', '+', 1) replacement = '\nVERSION = "%s"' % version content = re.sub(needle, replacement, content, 1) with open(fname, 'w') as f: