|
37 | 37 | import datetime
|
38 | 38 | import platform
|
39 | 39 | import subprocess
|
| 40 | +import tempfile |
40 | 41 |
|
41 | 42 | sys.path.append('third_party/python/semver')
|
42 | 43 | import semver
|
@@ -293,6 +294,11 @@ def discover_jdk():
|
293 | 294 | print('Using %s:\t%s' % ('JDK'.ljust(20), jdk_path))
|
294 | 295 | return jdk_path
|
295 | 296 |
|
| 297 | +def test_venv(): |
| 298 | + with tempfile.TemporaryDirectory() as tmpdirname: |
| 299 | + if subprocess.run(["python3", "-m", "venv", tmpdirname]).returncode != 0: |
| 300 | + fail("Python3 venv module is not installed.") |
| 301 | + |
296 | 302 | ######################################################################
|
297 | 303 | # Discover the linker directory
|
298 | 304 | ######################################################################
|
@@ -413,7 +419,8 @@ def main():
|
413 | 419 | env_map['AUTOMAKE'] = discover_tool('automake', 'Automake', 'AUTOMAKE', '1.9.6')
|
414 | 420 | env_map['AUTOCONF'] = discover_tool('autoconf', 'Autoconf', 'AUTOCONF', '2.6.3')
|
415 | 421 | env_map['MAKE'] = discover_tool('make', 'Make', 'MAKE', '3.81')
|
416 |
| - env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.4') |
| 422 | + env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.6') |
| 423 | + test_venv() |
417 | 424 |
|
418 | 425 | if platform == 'Darwin':
|
419 | 426 | env_map['LIBTOOL'] = discover_tool('glibtool', 'Libtool', 'LIBTOOL', '2.4.2')
|
|
0 commit comments