Files
Kyle AltendorfandGitHub 4cdf86f2c0 ensure poetry version via install scripts (#19369)
* ensure poetry version via install scripts

* Update Setup-poetry.ps1
2025-03-31 09:18:59 -05:00

39 lines
672 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
USAGE_TEXT="\
Usage: $0 [-ch]
-c command for Python
-h display this help and exit
"
usage() {
echo "${USAGE_TEXT}"
}
PYTHON_COMMAND=python
while getopts c:h flag; do
case "${flag}" in
c) PYTHON_COMMAND="${OPTARG}" ;;
h)
usage
exit 0
;;
*)
echo
usage
exit 1
;;
esac
done
if [ ! -d .penv/bin/ ]; then
"$PYTHON_COMMAND" -m venv .penv
.penv/bin/python -m pip install --upgrade pip
fi
# TODO: maybe make our own zipapp/shiv/pex of poetry and download that?
.penv/bin/python -m pip install --upgrade --requirement requirements-poetry.txt