Interactive interface for browsing global, full-resolution satellite imagery
fix python version determining logic #1682
Benjamin King44a148853fc8
diff --git a/tasks/buildOptions.sh b/tasks/buildOptions.shindex 6a2de6433..501b5d02e 100755--- a/tasks/buildOptions.sh+++ b/tasks/buildOptions.sh@@ -9,13 +9,15 @@ OPT_DIR="$BASE/config/default"BUILD_DIR="$BASE/build/options-build"DEST_DIR="$BASE/build/options"PYTHON_SCRIPTS_DIR="$TASKS_DIR/python2.7"+PYTHON_VERSION="$(python -V 2>&1)"+# If there is an active directory, use instead of defaultsif [ -d "$BASE/config/active" ]; thenSRC_DIR="$BASE/config/active"OPT_DIR="$BASE/config/active"fi-if command -v python3 &>/dev/null; then+if [command -v python3 &>/dev/null] || [[ $PYTHON_VERSION = *"Python 3"* ]]; thenPYTHON_SCRIPTS_DIR="$TASKS_DIR/python3"fi# If $IGNORE_ERRORS is true, don't fail on errorsdiff --git a/tasks/pythonInstall.sh b/tasks/pythonInstall.shindex dd53b1da7..67437ee92 100755--- a/tasks/pythonInstall.sh+++ b/tasks/pythonInstall.sh@@ -1,7 +1,8 @@#!/bin/bash# Install python dependencies+PYTHON_VERSION="$(python -V 2>&1)"if [ $1 = "linux" ]; then- if command -v python3 &>/dev/null; then+ if [command -v python3 &>/dev/null] || [[ $PYTHON_VERSION = *"Python 3"* ]]; thenecho "Installing virtualenv with python3"python3 -m pip install --user virtualenvpython3 -m virtualenv .python@@ -20,7 +21,7 @@ if [ $1 = "linux" ]; thenfielse# If is a window machine use virtualenv- if command -v python3 &>/dev/null; then+ if [command -v python3 &>/dev/null] || [[ $PYTHON_VERSION = *"Python 3"* ]]; thenvirtualenv .pythonPATH=.python/Scripts:${PATH} pip install -r requirements.txtelse