diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh index 1977ab67a..9a35eb4e2 100755 --- a/scripts/dependencies.sh +++ b/scripts/dependencies.sh @@ -2,11 +2,19 @@ set -euo pipefail +# Use the python from PATH (set by setup-python) +PYTHON_BIN="${PYTHON_BIN:-python}" + + if ! [ -x "$(command -v poetry)" ]; then if ! [ -x "$(command -v pipx)" ]; then - python -m pip install --user pipx --isolated - python -m pipx ensurepath + $PYTHON_BIN -m pip install --user pipx --isolated + $PYTHON_BIN -m pipx ensurepath fi - pipx install poetry + pipx install poetry --python $PYTHON_BIN fi + +# Ensure poetry uses the correct python environment +poetry env use $PYTHON_BIN + poetry self add poetry-plugin-lambda-build@2.1.0 poetry-plugin-export@1.9.0