Skip to content

Commit 676e9b4

Browse files
committed
build: fix build with Python 3.12
Replace `distutils.version.StrictVersion` with `packaging.version.Version`. Refs: #50209 (comment)
1 parent 9a321dd commit 676e9b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

configure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import io
1515
from pathlib import Path
1616

17-
from distutils.version import StrictVersion
17+
from tools.gyp.pylib.packaging.version import Version
1818

1919
# If not run from node/, cd to node/.
2020
os.chdir(Path(__file__).parent)
@@ -1566,10 +1566,10 @@ def without_ssl_error(option):
15661566
# supported asm compiler for AVX2. See https://github.com/openssl/openssl/
15671567
# blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
15681568
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'))
1569+
('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \
1570+
('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \
1571+
('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \
1572+
('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10'))
15731573

15741574
if is_x86 and not openssl110_asm_supported:
15751575
error('''Did not find a new enough assembler, install one or build with

0 commit comments

Comments
 (0)