aboutsummaryrefslogtreecommitdiff
blob: be113ce8e6c7fe71c4e5848de19674a74aac675b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Maintainer: Oskari Pirhonen <xxc3ncoredxx@gmail.com>

set -ex

install_versions=( "${@/#/python}" )

sudo apt-get install -y --no-install-recommends \
    python-is-python3 \
    "${install_versions[@]}" \
    "${install_versions[@]/%/-venv}"

for py in "${@}"; do
  "python$py" -m venv ".venv-$py"
  source ".venv-$py/bin/activate"
  pip install --upgrade pip
  deactivate
done

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
deactivate