initial commit
This commit is contained in:
23
scripts/setup-env.sh
Executable file
23
scripts/setup-env.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/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
|
Reference in New Issue
Block a user