-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathvagrant-provision.sh
executable file
·37 lines (27 loc) · 1.16 KB
/
vagrant-provision.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
sudo apt-get update -qq
sudo apt-get install --no-install-recommends -qq -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
export PATH="${HOME}/.local/bin:$PATH"
# pip and tox should be installed with system python, not any .pyenv environments
sudo apt-get install -y python3-pip
pip install --upgrade pip
pip install tox
# https://github.com/pyenv/pyenv-installer#readme
curl -s -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
echo '
export PATH="${HOME}/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
' >> ~/.bashrc
source ~/.bashrc
exec $SHELL
# 'exec $SHELL' doesn't work well in a provision file. Likely you need to
# run the following commands manually after 'vagrant up'
for VERSION in 3.8 3.9 3.10 3.11 3.12 3.13; do
VERSION=$(pyenv latest --known $VERSION)
echo "Installing $VERSION ..."
pyenv install --skip-existing $VERSION
done
# Any version not part of the globals isn't found by tox' envlist
pyenv global $(pyenv versions --bare)
pyenv versions