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: allow Python 3.8 #30194

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ transition before the year-end deadline.
* GNU Make 3.81 or newer
* Python (see note above)
* Python 2.7
* Python 3.5, 3.6, and 3.7 are experimental.
* Python 3.5, 3.6, 3.7, and 3.8 are experimental.

Installation via Linux package manager can be achieved with:

Expand All @@ -262,7 +262,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, and 3.7 are experimental.
* Python 3.5, 3.6, 3.7, and 3.8 are experimental.

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 @@ -7,6 +7,7 @@
# pyenv will alert which shims are available and then will fail the build.
_=[ 'exec' '/bin/sh' '-c' '''
test ${TRAVIS} && exec python "$0" "$@" # workaround for pyenv on Travis CI
which python3.8 >/dev/null && exec python3.8 "$0" "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe check for python3 first?

Copy link
Contributor

@cclauss cclauss Oct 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trouble with doing that is that python3 might be in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4)) which we (and the Python Core Team) do not support.

which python3.7 >/dev/null && exec python3.7 "$0" "$@"
which python3.6 >/dev/null && exec python3.6 "$0" "$@"
which python3.5 >/dev/null && exec python3.5 "$0" "$@"
Expand All @@ -20,7 +21,7 @@ import sys
from distutils.spawn import find_executable

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