py3: get rid of py2 on CI scripts

This commit is contained in:
Mr. Outis
2019-12-30 19:16:10 -06:00
parent d3d6f679be
commit c61254dc75
5 changed files with 19 additions and 53 deletions
+4 -11
View File
@@ -44,16 +44,9 @@ if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]]; then
fi
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
if [[ -n "$PY2" ]]; then
$scriptdir/retry.sh choco install python2
echo 'PATH="/c/Python27:/c/Python27/Scripts:$PATH"' >> env.sh
else
$scriptdir/retry.sh choco install python --version 3.7.5
echo 'PATH="/c/Python37:/c/Python37/Scripts:$PATH"' >> env.sh
fi
$scriptdir/retry.sh choco install python --version 3.7.5
echo 'PATH="/c/Python37:/c/Python37/Scripts:$PATH"' >> env.sh
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ ! -n "$PY2" ]]; then
ln -s -f /usr/local/bin/python3 /usr/local/bin/python
ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip
fi
ln -s -f /usr/local/bin/python3 /usr/local/bin/python
ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip
fi
+3 -8
View File
@@ -12,12 +12,7 @@ else
fi
py_ver="$(python -c 'import sys; print(sys.version[0])')"
if [[ -n "$PY2" ]]; then
if [[ "$py_ver" != "2" ]]; then
exit 1
fi
else
if [[ "$py_ver" != "3" ]]; then
exit 1
fi
if [[ "$py_ver" != 3 ]]; then
exit 1
fi
-7
View File
@@ -2,13 +2,6 @@
set -e
python_ver="$(python -c 'import sys; print(sys.version_info[0])')"
if [[ $python_ver != "2" ]]; then
echo false
exit 0
fi
if [[ $TRAVIS_OS_NAME == "osx" && $TRAVIS_OSX_IMAGE != "xcode8.3" ]]; then
echo false
exit 0
+1 -2
View File
@@ -6,8 +6,7 @@ set -e
python -mtests
if [[ "$TRAVIS_PULL_REQUEST" == "false" && \
"$TRAVIS_SECURE_ENV_VARS" == "true" && \
"$(python -c 'import sys; print(sys.version_info[0])')" == '2' ]]; then
"$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then
pip install codecov
codecov
fi