From 17565578c7f3a5443943ca68e481126825825439 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 17 Feb 2022 13:57:09 -0700 Subject: Initial commit --- bin/build.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/build.sh (limited to 'bin/build.sh') diff --git a/bin/build.sh b/bin/build.sh new file mode 100755 index 0000000..f7fb60e --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,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 -- cgit v1.2.3