|
14 | 14 | import io
|
15 | 15 | from pathlib import Path
|
16 | 16 |
|
17 |
| -from distutils.version import StrictVersion |
18 |
| - |
19 | 17 | # If not run from node/, cd to node/.
|
20 | 18 | os.chdir(Path(__file__).parent)
|
21 | 19 |
|
|
30 | 28 |
|
31 | 29 | sys.path.insert(0, str(tools_path / 'gyp' / 'pylib'))
|
32 | 30 | from gyp.common import GetFlavor
|
| 31 | +from packaging.version import Version |
33 | 32 |
|
34 | 33 | # imports in tools/configure.d
|
35 | 34 | sys.path.insert(0, str(tools_path / 'configure.d'))
|
@@ -1566,10 +1565,10 @@ def without_ssl_error(option):
|
1566 | 1565 | # supported asm compiler for AVX2. See https://github.com/openssl/openssl/
|
1567 | 1566 | # blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
|
1568 | 1567 | openssl110_asm_supported = \
|
1569 |
| - ('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \ |
1570 |
| - ('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \ |
1571 |
| - ('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \ |
1572 |
| - ('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10')) |
| 1568 | + ('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \ |
| 1569 | + ('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \ |
| 1570 | + ('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \ |
| 1571 | + ('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10')) |
1573 | 1572 |
|
1574 | 1573 | if is_x86 and not openssl110_asm_supported:
|
1575 | 1574 | error('''Did not find a new enough assembler, install one or build with
|
|
0 commit comments