0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

build: python3 support for configure

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rod Vagg 2019-10-21 22:26:02 +11:00
parent 7a82e5ee62
commit 779d7efa72
No known key found for this signature in database
GPG Key ID: C273792F7D83545D

View File

@ -12,6 +12,7 @@ import shlex
import subprocess
import shutil
import bz2
import io
from distutils.spawn import find_executable as which
from distutils.version import StrictVersion
@ -1497,10 +1498,11 @@ def configure_intl(o):
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']: