Skip to content

Commit d3cd565

Browse files
committed
Correctly parse the new Windows binaries names
Before this improvement root-project/root@1998f73 they had names like "root_v6.35.01.win64.vc17.zip". After this improvement, i.e. 2024-11-7, "root_v6.35.01.win64.python311.vc17.zip" i.e. they encode the python version.
1 parent f8f43f5 commit d3cd565

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_releases/make-release-page.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ def binaryNameToTitle(filename):
261261

262262
return F"macOS {macOSVers} {arch} Xcode {xcodeVers}"
263263
elif platformCompiler.startswith('win32') or platformCompiler.startswith('win64'):
264-
regexWin = re.compile(r'^win(32|64)[.](vc[0-9]+)(.debug)?')
264+
regexWin = re.compile(r'^win(32|64)[.](python3[0-9]+)[.](vc[0-9]+)(.debug)?')
265265
matchWin = regexWin.match(platformCompiler)
266266
if not matchWin:
267267
print(F'ERROR: cannot parse Win32 MSVC version for {filename}')
268268
return filename
269-
(bitness, vcVers, debug) = matchWin.groups()
269+
(bitness, pythonVers, vcVers, debug) = matchWin.groups()
270270
if not debug:
271271
debug = ''
272272
else:
@@ -291,7 +291,7 @@ def binaryNameToTitle(filename):
291291
bitArch = "x86"
292292
else:
293293
bitArch = "x64"
294-
return F"Windows Visual Studio {versYear} {bitness}-bit {bitArch} {debug}"
294+
return F"Windows Visual Studio {versYear} {bitness}-bit {bitArch}{debug}"
295295
else:
296296
frameinfo = getframeinfo(currentframe())
297297
print(F'ERROR: unknown platform {platformCompiler} for {filename}. Please edit {frameinfo.filename}:{frameinfo.lineno}')

0 commit comments

Comments
 (0)