Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix build with Python 3.12 #50582

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import io
from pathlib import Path

from distutils.version import StrictVersion

# If not run from node/, cd to node/.
os.chdir(Path(__file__).parent)

Expand All @@ -30,6 +28,7 @@

sys.path.insert(0, str(tools_path / 'gyp' / 'pylib'))
from gyp.common import GetFlavor
from packaging.version import Version

# imports in tools/configure.d
sys.path.insert(0, str(tools_path / 'configure.d'))
Expand Down Expand Up @@ -1566,10 +1565,10 @@ def without_ssl_error(option):
# supported asm compiler for AVX2. See https://github.com/openssl/openssl/
# blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
openssl110_asm_supported = \
('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \
('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \
('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \
('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10'))
('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \
('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \
('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \
('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10'))

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