#!/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