initial commit

This commit is contained in:
2022-08-28 13:02:29 +08:00
commit 184eb978b7
12 changed files with 84 additions and 0 deletions

23
scripts/setup-env.sh Executable file
View 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