mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 20:26:49 +00:00
[Ubuntu] Remove Ubuntu16 related code from the VE repository (#4336)
This commit is contained in:
committed by
GitHub
parent
1f97f5de37
commit
2d46e3f4d9
@@ -10,31 +10,26 @@ source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Python, Python 3, pip, pip3
|
||||
if isUbuntu16 || isUbuntu18; then
|
||||
if isUbuntu18; then
|
||||
apt-get install -y --no-install-recommends python python-dev python-pip
|
||||
fi
|
||||
|
||||
apt-get install -y --no-install-recommends python3 python3-dev python3-pip python3-venv
|
||||
|
||||
if isUbuntu18 || isUbuntu20 ; then
|
||||
# Install pipx
|
||||
# Set pipx custom directory
|
||||
export PIPX_BIN_DIR=/opt/pipx_bin
|
||||
export PIPX_HOME=/opt/pipx
|
||||
|
||||
python3 -m pip install pipx
|
||||
python3 -m pipx ensurepath
|
||||
|
||||
# Update /etc/environment
|
||||
setEtcEnvironmentVariable "PIPX_BIN_DIR" $PIPX_BIN_DIR
|
||||
setEtcEnvironmentVariable "PIPX_HOME" $PIPX_HOME
|
||||
prependEtcEnvironmentPath $PIPX_BIN_DIR
|
||||
|
||||
# Test pipx
|
||||
if ! command -v pipx; then
|
||||
echo "pipx was not installed or not found on PATH"
|
||||
exit 1
|
||||
fi
|
||||
# Install pipx
|
||||
# Set pipx custom directory
|
||||
export PIPX_BIN_DIR=/opt/pipx_bin
|
||||
export PIPX_HOME=/opt/pipx
|
||||
python3 -m pip install pipx
|
||||
python3 -m pipx ensurepath
|
||||
# Update /etc/environment
|
||||
setEtcEnvironmentVariable "PIPX_BIN_DIR" $PIPX_BIN_DIR
|
||||
setEtcEnvironmentVariable "PIPX_HOME" $PIPX_HOME
|
||||
prependEtcEnvironmentPath $PIPX_BIN_DIR
|
||||
# Test pipx
|
||||
if ! command -v pipx; then
|
||||
echo "pipx was not installed or not found on PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Adding this dir to PATH will make installed pip commands are immediately available.
|
||||
|
||||
Reference in New Issue
Block a user