aboutsummaryrefslogtreecommitdiff
path: root/bin/build.sh
blob: f7fb60e307894b62101f865b4258871d0fef10d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
set -euo pipefail

# This reads this .python-version file and will install that version if it
# doesn't already exist. Only install if the pyenv command is present, if we
# are running this in an environment where the host python is already set, like
# a docker container or provisioned host, we can skip using pyenv
[[ -x "$(command -v pyenv)" ]] && pyenv install --skip-existing

# If the virtualenv already exits, exit cleanly
[[ -d ".venv" ]] && echo "Virtual environment already exists" && exit 0

# Create the virtual env
python -m venv --prompt localstack .venv

# Install the requirements
./.venv/bin/pip install -r requirements.txt