Skip to content
Permalink
Browse files

build: python3 support for configure

PR-URL: #30047
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
  • Loading branch information
rvagg authored and targos committed Oct 21, 2019
1 parent 4277066 commit 0415dd7cb3f43849f9d6f1f8d271b39c4649c3de
Showing with 7 additions and 4 deletions.
  1. +7 −4 configure.py
@@ -11,6 +11,8 @@
import shlex
import subprocess
import shutil
import io

from distutils.spawn import find_executable as which
from distutils.version import StrictVersion

@@ -1499,10 +1501,11 @@ def write_config(data, name):
icu_ver_major = None
matchVerExp = r'^\s*#define\s+U_ICU_VERSION_SHORT\s+"([^"]*)".*'
match_version = re.compile(matchVerExp)
for line in open(uvernum_h).readlines():
m = match_version.match(line)
if m:
icu_ver_major = m.group(1)
with io.open(uvernum_h, encoding='utf8') as in_file:
for line in in_file:
m = match_version.match(line)
if m:
icu_ver_major = str(m.group(1))
if not icu_ver_major:
error('Could not read U_ICU_VERSION_SHORT version from %s' % uvernum_h)
elif int(icu_ver_major) < icu_versions['minimum_icu']:

0 comments on commit 0415dd7

Please sign in to comment.
You can’t perform that action at this time.