#!/usr/bin/env bash SCRIPTDIR=$(dirname $0) BASEDIR=$(dirname $SCRIPTDIR) pip_options=() if [ ! -z "${PYPI_MIRROR}" ]; then pip_options+=(-i "${PYPI_MIRROR}") fi create-venv() { python -m venv venv } install-requirements() { pip install "${pip_options[@]}" -r requirements.txt } pushd ${BASEDIR} create-venv . ./venv/bin/activate install-requirements