mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
* ensure poetry version via install scripts * Update Setup-poetry.ps1
39 lines
672 B
Bash
Executable File
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
|