Skip to content

Commit b9a9ec5

Browse files
pquentinsethmlarson
authored andcommitted
Install MacPython only once on Travis (urllib3#1689)
1 parent ab2adec commit b9a9ec5

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

_travis/install.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ install_mac_python() {
88
local MINOR=$(echo $FULL | cut -d. -f1,2)
99
local PYTHON_EXE=/Library/Frameworks/Python.framework/Versions/${MINOR}/bin/python${MINOR}
1010

11-
# Already installed.
12-
if [[ -f "${PYTHON_EXE}" ]]; then
13-
return 0;
14-
fi
15-
1611
curl -Lo macpython.pkg https://www.python.org/ftp/python/${FULL}/python-${FULL}-macosx10.6.pkg
1712
sudo installer -pkg macpython.pkg -target /
1813

@@ -31,17 +26,13 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
3126
test-3.7) MACPYTHON=3.7.4 ;;
3227
esac
3328

34-
# Install additional versions as needed.
3529
install_mac_python $MACPYTHON
3630

37-
# Always install 3.6 for Nox
38-
install_mac_python "3.6.7"
39-
4031
# Enable TLS 1.3 on macOS
4132
sudo defaults write /Library/Preferences/com.apple.networkd tcp_connect_enable_tls13 1
4233

4334
# Install Nox
44-
python3.6 -m pip install nox
35+
python3 -m pip install nox
4536

4637
else
4738
# Linux Setup

_travis/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ fi
88

99
if [ -n "${NOX_SESSION}" ]; then
1010
if [[ "$(uname -s)" == 'Darwin' ]]; then
11-
# Explicitly use Python 3.6 on MacOS, otherwise it won't find Nox properly.
12-
python3.6 -m nox -s "${NOX_SESSION}"
11+
# Explicitly use python3 on macOS as `nox` is not in the PATH
12+
python3 -m nox -s "${NOX_SESSION}"
1313
else
1414
nox -s "${NOX_SESSION}"
1515
fi

0 commit comments

Comments
 (0)