75 lines
3.0 KiB
Diff
75 lines
3.0 KiB
Diff
From cf748ad2b7f760e2df1bc8a811f887161b892534 Mon Sep 17 00:00:00 2001
|
|
From: Luigi Pinca <luigipinca@gmail.com>
|
|
Date: Wed, 26 Oct 2022 15:01:59 +0200
|
|
Subject: [PATCH] build: support Python 3.11
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
PR-URL: https://github.com/nodejs/node/pull/45191
|
|
Reviewed-By: Rich Trott <rtrott@gmail.com>
|
|
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
|
|
Reviewed-By: Richard Lau <rlau@redhat.com>
|
|
Reviewed-By: Christian Clauss <cclauss@me.com>
|
|
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
|
|
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
|
|
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
|
|
---
|
|
BUILDING.md | 6 +++---
|
|
configure | 3 ++-
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/BUILDING.md b/BUILDING.md
|
|
index 0dd954880131..e66aa314d329 100644
|
|
--- a/BUILDING.md
|
|
+++ b/BUILDING.md
|
|
@@ -225,7 +225,7 @@ The Node.js project supports Python >= 3 for building and testing.
|
|
|
|
* `gcc` and `g++` >= 8.3 or newer
|
|
* GNU Make 3.81 or newer
|
|
-* Python 3.6, 3.7, 3.8, 3.9, or 3.10 (see note above)
|
|
+* Python >=3.6 <=3.11 (see note above)
|
|
* For test coverage, your Python installation must include pip.
|
|
|
|
Installation via Linux package manager can be achieved with:
|
|
@@ -241,7 +241,7 @@ FreeBSD and OpenBSD users may also need to install `libexecinfo`.
|
|
#### macOS prerequisites
|
|
|
|
* Xcode Command Line Tools >= 11 for macOS
|
|
-* Python 3.6, 3.7, 3.8, 3.9, or 3.10 (see note above)
|
|
+* Python >=3.6 <=3.11 (see note above)
|
|
* For test coverage, your Python installation must include pip.
|
|
|
|
macOS users can install the `Xcode Command Line Tools` by running
|
|
@@ -565,7 +565,7 @@ to run it again before invoking `make -j4`.
|
|
|
|
##### Option 1: Manual install
|
|
|
|
-* [Python 3.10](https://www.microsoft.com/en-us/p/python-310/9pjpw5ldxlz5)
|
|
+* [Python 3.11](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K)
|
|
* The "Desktop development with C++" workload from
|
|
[Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products) or
|
|
the "C++ build tools" workload from the
|
|
diff --git a/configure b/configure
|
|
index 6ef2da2e631e..fefb313c9cd1 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -4,6 +4,7 @@
|
|
# Note that the mix of single and double quotes is intentional,
|
|
# as is the fact that the ] goes on a new line.
|
|
_=[ 'exec' '/bin/sh' '-c' '''
|
|
+command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
|
|
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
|
|
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
|
|
command -v python3.8 >/dev/null && exec python3.8 "$0" "$@"
|
|
@@ -22,7 +23,7 @@ except ImportError:
|
|
from distutils.spawn import find_executable as which
|
|
|
|
print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
|
|
-acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
|
|
+acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
|
|
if sys.version_info[:2] in acceptable_pythons:
|
|
import configure
|
|
else:
|