diff options
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -65,6 +65,26 @@ if [ "$COMMAND" = "test" -a $# -ne 2 ] ; then exit 1 fi +# Switch to Python 3 if requesting +case "$LM_PYTHON_VERSION" in + "2"|"2.7") + echo "using python $LM_PYTHON_VERSION" + pip --version + ;; + + "3"|"3.5") + echo "switching to python $LM_PYTHON_VERSION" + pip3 install --upgrade --no-index -f "file://$LOCAL_PYPI_INDEX" "pip==$VERSION_OF_PIP" + update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1 + pip --version + ;; + + *) + echo "python version not supported: $LM_PYTHON_VERSION" >&2 + exit 1 + ;; +esac + # Run command case "$COMMAND" in test) |
