From f83b9bcb6fd4e62ec6b8f38c1dc0d11d91965980 Mon Sep 17 00:00:00 2001 From: FrankQiu Date: Mon, 4 Oct 2021 15:01:04 +0800 Subject: [PATCH] build: support Python 3.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/40296 Fixes: https://github.com/nodejs/node/issues/40294 Reviewed-By: Jiawen Geng Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Christian Clauss Reviewed-By: Michaƫl Zasso --- .github/workflows/build-tarball.yml | 4 ++-- .github/workflows/build-windows.yml | 2 +- .github/workflows/coverage-linux.yml | 2 +- .github/workflows/coverage-windows.yml | 2 +- .github/workflows/linters.yml | 2 +- .github/workflows/test-asan.yml | 2 +- .github/workflows/test-internet.yml | 2 +- .github/workflows/test-linux.yml | 2 +- .github/workflows/test-macos.yml | 2 +- BUILDING.md | 4 ++-- configure | 3 ++- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 0e70aaaa5cd1fd..7f96504f781406 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -27,7 +27,7 @@ jobs: build-tarball: if: github.event.pull_request.draft == false env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -52,7 +52,7 @@ jobs: path: tarballs test-tarball-linux: env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' needs: build-tarball runs-on: ubuntu-latest steps: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index d489de708d130b..e6fd0a4b92fe23 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -12,7 +12,7 @@ on: - v[0-9]+.x env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 59a758ebdfc6a0..e322e764840989 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -19,7 +19,7 @@ on: - 'doc/**' env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 0f0072bfe6c532..4473eb9bd74ae3 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -21,7 +21,7 @@ on: - 'tools/**' env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 2694e07ab3c6fd..131d220562a5d9 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -11,7 +11,7 @@ on: - v[0-9]+.x env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' NODE_VERSION: lts/* jobs: diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index 8745f5eb4c0f9a..021747ace19a4b 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -22,7 +22,7 @@ on: - 'doc/**' env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index 8d2ba377d3cd0f..44757dd287280c 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -20,7 +20,7 @@ on: - test/internet/** env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 07e871bd07dc02..01227a0ff92289 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -12,7 +12,7 @@ on: - v[0-9]+.x env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index a099a25285c278..6c5e3ab310cb27 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -22,7 +22,7 @@ on: - 'doc/**' env: - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare jobs: diff --git a/BUILDING.md b/BUILDING.md index cdc3ac42469f7b..e7baaca5d7e620 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -239,7 +239,7 @@ The Node.js project supports Python >= 3 for building and testing. * `gcc` and `g++` >= 8.3 or newer, or * GNU Make 3.81 or newer -* Python 3.6, 3.7, 3.8, or 3.9 (see note above) +* Python 3.6, 3.7, 3.8, 3.9, or 3.10 (see note above) Installation via Linux package manager can be achieved with: @@ -254,7 +254,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, or 3.9 (see note above) +* Python 3.6, 3.7, 3.8, 3.9, or 3.10 (see note above) macOS users can install the `Xcode Command Line Tools` by running `xcode-select --install`. Alternatively, if you already have the full Xcode diff --git a/configure b/configure index baf4b513da881b..6ef2da2e631e6e 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.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" "$@" command -v python3.7 >/dev/null && exec python3.7 "$0" "$@" @@ -21,7 +22,7 @@ except ImportError: from distutils.spawn import find_executable as which print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) -acceptable_pythons = ((3, 9), (3, 8), (3, 7), (3, 6)) +acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6)) if sys.version_info[:2] in acceptable_pythons: import configure else: