svn commit: r1921266 - /subversion/trunk/build/generator/gen_win_dependencies.py

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: jun66j5
Date: Sat Oct 12 03:30:46 2024
New Revision: 1921266

URL: http://svn.apache.org/viewvc?rev=1921266&view=rev
Log:
Adapt detection for zlib version in gen-make.py on Windows to `x.y` and
`x.y.z.w` version string.

* build/generator/gen_win_dependencies.py
  (_find_zlib): Allow `x.y`, `x.y.z` and `x.y.z.w` as version string.

Modified:
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1921266&r1=1921265&r2=1921266&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Sat Oct 12 03:30:46 2024
@@ -769,11 +769,11 @@ class GenDependenciesBase(gen_base.Gener
 
     txt = open(version_file_path).read()
     vermatch = re.search(
-                r'^\s*#define\s+ZLIB_VERSION\s+"(\d+)\.(\d+)\.(\d+)(?:\.\d)?"',
+                r'^\s*#define\s+ZLIB_VERSION\s+"(\d+(?:\.\d+){1,3})(?:-\w+)?"',
                  txt, re.M)
 
-    version = tuple(map(int, vermatch.groups()))
-    self.zlib_version = '%d.%d.%d' % version
+    version = tuple(map(int, vermatch.group(1).split('.')))
+    self.zlib_version = '.'.join(map(str, version))
 
     if version < minimal_zlib_version:
       sys.stderr.write("ERROR: ZLib %s or higher is required "
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.