Skip to content

Commit f9b3bec

Browse files
lpincarichardlau
authored andcommitted
build: support Python 3.11
PR-URL: nodejs#45191 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent a1d5209 commit f9b3bec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

BUILDING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ test with Python 3.
240240
* GNU Make 3.81 or newer
241241
* Python (see note above)
242242
* Python 2.7
243-
* Python 3.5, 3.6, 3.7, 3.8, 3.9 or 3.10 (see note above)
243+
* Python >=3.5 <=3.11 (see note above)
244244

245245
Installation via Linux package manager can be achieved with:
246246

@@ -257,7 +257,7 @@ FreeBSD and OpenBSD users may also need to install `libexecinfo`.
257257
* Xcode Command Line Tools >= 10 for macOS
258258
* Python (see note above)
259259
* Python 2.7
260-
* Python 3.6, 3.7, 3.8, 3.9, or 3.10 (see note above)
260+
* Python >=3.5 <=3.11 (see note above)
261261

262262
macOS users can install the `Xcode Command Line Tools` by running
263263
`xcode-select --install`. Alternatively, if you already have the full Xcode
@@ -561,7 +561,7 @@ to run it again before invoking `make -j4`.
561561

562562
##### Option 1: Manual install
563563

564-
* [Python 3.8](https://www.python.org/downloads/)
564+
* [Python 3.11](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K)
565565
* The "Desktop development with C++" workload from
566566
[Visual Studio 2017 or 2019](https://visualstudio.microsoft.com/downloads/) or
567567
the "Visual C++ build tools" workload from the

configure

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# as is the fact that the ] goes on a new line.
66
_=[ 'exec' '/bin/sh' '-c' '''
77
test ${FORCE_PYTHON2} && exec python2 "$0" "$@" # workaround for gclient
8+
command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
89
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
910
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
1011
command -v python3.8 >/dev/null && exec python3.8 "$0" "$@"
@@ -25,7 +26,7 @@ except ImportError:
2526
from distutils.spawn import find_executable as which
2627

2728
print('Node.js configure: Found Python {0}.{1}.{2}...'.format(*sys.version_info))
28-
acceptable_pythons = ((3,10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
29+
acceptable_pythons = ((3,11), (3,10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
2930
if sys.version_info[:2] in acceptable_pythons:
3031
import configure
3132
else:

0 commit comments

Comments
 (0)