2019-01-14 11:12:41 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# Use the Python executable provided from the `-p` option, or a default.
|
2019-11-22 11:26:14 +00:00
|
|
|
[ "$1" = "-p" ] && PYTHON=$2 || PYTHON="python3"
|
2019-01-14 11:12:41 +00:00
|
|
|
|
|
|
|
REQUIREMENTS="requirements.txt"
|
|
|
|
VENV="venv"
|
|
|
|
|
|
|
|
set -x
|
2020-04-23 15:05:05 +00:00
|
|
|
|
|
|
|
if [ -z "$GITHUB_ACTIONS" ]; then
|
|
|
|
"$PYTHON" -m venv "$VENV"
|
|
|
|
PIP="$VENV/bin/pip"
|
|
|
|
else
|
|
|
|
PIP="pip"
|
|
|
|
fi
|
|
|
|
|
2022-10-08 09:30:42 +00:00
|
|
|
"$PIP" install -U pip
|
2019-01-14 11:12:41 +00:00
|
|
|
"$PIP" install -r "$REQUIREMENTS"
|