Skip to content

Commit

Permalink
build: support Python 3.10.0
Browse files Browse the repository at this point in the history
PR-URL: nodejs#40296
Fixes: nodejs#40294
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Christian Clauss <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
iam-frankqiu authored and richardlau committed Nov 1, 2021
1 parent be77dd7 commit 5839ebb
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
build-tarball:
env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -41,7 +41,7 @@ jobs:
path: tarballs
test-tarball-linux:
env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
needs: build-tarball
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- v[0-9]+.x

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- v[0-9]+.x

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
NODE_VERSION: lts/*

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- 'doc/**'

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- v[0-9]+.x

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- 'doc/**'

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
Expand Down
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ test with Python 3.
* GNU Make 3.81 or newer
* Python (see note above)
* Python 2.7
* Python 3.5, 3.6, 3.7, or 3.8
* Python 3.5, 3.6, 3.7, 3.8, 3.9 or 3.10 (see note above)

Installation via Linux package manager can be achieved with:

Expand All @@ -256,7 +256,7 @@ FreeBSD and OpenBSD users may also need to install `libexecinfo`.
* Xcode Command Line Tools >= 10 for macOS
* Python (see note above)
* Python 2.7
* Python 3.5, 3.6, 3.7, or 3.8
* 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
Expand Down
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# as is the fact that the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
test ${FORCE_PYTHON2} && exec python2 "$0" "$@" # workaround for gclient
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" "$@"
Expand All @@ -24,7 +25,7 @@ except ImportError:
from distutils.spawn import find_executable as which

print('Node.js configure: Found Python {0}.{1}.{2}...'.format(*sys.version_info))
acceptable_pythons = ((3, 9), (3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
acceptable_pythons = ((3,10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
if sys.version_info[:2] in acceptable_pythons:
import configure
else:
Expand Down

0 comments on commit 5839ebb

Please sign in to comment.