Merge pull request #2653 from filips123/support-python3-in-workspace

Add support for Python 3 in workspace
This commit is contained in:
Shao Yu-Lung (Allen) 2020-08-11 11:19:29 +08:00 committed by GitHub
commit 0308326518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -113,6 +113,7 @@ services:
- INSTALL_MC=${WORKSPACE_INSTALL_MC} - INSTALL_MC=${WORKSPACE_INSTALL_MC}
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY} - INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON} - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
- INSTALL_PYTHON3=${WORKSPACE_INSTALL_PYTHON3}
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK} - INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM} - INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}

View File

@ -139,6 +139,7 @@ WORKSPACE_INSTALL_LINUXBREW=false
WORKSPACE_INSTALL_MC=false WORKSPACE_INSTALL_MC=false
WORKSPACE_INSTALL_SYMFONY=false WORKSPACE_INSTALL_SYMFONY=false
WORKSPACE_INSTALL_PYTHON=false WORKSPACE_INSTALL_PYTHON=false
WORKSPACE_INSTALL_PYTHON3=false
WORKSPACE_INSTALL_POWERLINE=false WORKSPACE_INSTALL_POWERLINE=false
WORKSPACE_INSTALL_SUPERVISOR=false WORKSPACE_INSTALL_SUPERVISOR=false
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false

View File

@ -1068,7 +1068,7 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
;fi ;fi
########################################################################### ###########################################################################
# PYTHON: # PYTHON2:
########################################################################### ###########################################################################
ARG INSTALL_PYTHON=false ARG INSTALL_PYTHON=false
@ -1079,6 +1079,18 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
&& python -m pip install --upgrade virtualenv \ && python -m pip install --upgrade virtualenv \
;fi ;fi
###########################################################################
# PYTHON3:
###########################################################################
ARG INSTALL_PYTHON3=false
RUN if [ ${INSTALL_PYTHON3} = true ]; then \
apt-get -y install python3 python3-pip python3-dev build-essential \
&& python3 -m pip install --upgrade --force-reinstall pip \
&& python3 -m pip install --upgrade virtualenv \
;fi
########################################################################### ###########################################################################
# POWERLINE: # POWERLINE:
########################################################################### ###########################################################################