mirror of
https://github.com/neovim/neovim.git
synced 2026-04-22 15:25:30 +00:00
Homebrew changed a few formulae to meet their standards. "python3" was renamed to "python", and "python2" to "python@2". As for why, read this announcement: https://brew.sh/2018/01/19/homebrew-1.5.0 Since we install Python 3 via homebrew anyway, we now do the same for Python 2 as well. We do that because the system Python 2 of macOS comes without pip installed and this way seems cleaner than doing "sudo easy_install pip". The Python 2 formula is keg-only now, so it doesn't interfere with the system Python 2. Therefore we have to add its executables to $PATH ourselves.
55 lines
1.2 KiB
Bash
Executable File
55 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
if [[ "${CI_TARGET}" == lint ]]; then
|
|
exit
|
|
fi
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
|
brew update
|
|
fi
|
|
|
|
echo 'python info:'
|
|
(
|
|
2>&1 python --version || true
|
|
2>&1 python2 --version || true
|
|
2>&1 python3 --version || true
|
|
2>&1 pip --version || true
|
|
2>&1 pip2 --version || true
|
|
2>&1 pip3 --version || true
|
|
echo 'pyenv versions:'
|
|
2>&1 pyenv versions || true
|
|
) | sed 's/^/ /'
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
|
echo "Install Python 2."
|
|
brew install python@2
|
|
fi
|
|
|
|
echo "Upgrade Python 2 pip."
|
|
pip2.7 -q install --user --upgrade pip
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
|
echo "Upgrade Python 3."
|
|
brew upgrade python
|
|
echo "Upgrade Python 3 pip."
|
|
pip3 -q install --user --upgrade pip
|
|
else
|
|
echo "Upgrade Python 3 pip."
|
|
# Allow failure. pyenv pip3 on travis is broken:
|
|
# https://github.com/travis-ci/travis-ci/issues/8363
|
|
pip3 -q install --user --upgrade pip || true
|
|
fi
|
|
|
|
echo "Install node (LTS)"
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == osx ]] || [ ! -f ~/.nvm/nvm.sh ]; then
|
|
curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh
|
|
fi
|
|
|
|
source ~/.nvm/nvm.sh
|
|
nvm install --lts
|
|
nvm use --lts
|