Files
chia-blockchain/setup-poetry.sh
T
Earle LoweandGitHub e07d1eb5de Use #!/usr/bin/env bash (#18762)
* Use #!/usr/bin/env bash

* Update setup-poetry.sh

* Use #!/usr/bin/env bash for shebang

* fix up typo for leading space

* For consistency fix up a few other scripts
2024-11-04 15:22:52 -07:00

37 lines
648 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
"$PYTHON_COMMAND" -m venv .penv
.penv/bin/python -m pip install --upgrade pip setuptools wheel
# TODO: maybe make our own zipapp/shiv/pex of poetry and download that?
.penv/bin/python -m pip install poetry "poetry-dynamic-versioning[plugin]"