From 157d1a461182aa69bb5314b8654ca30e7021b3c8 Mon Sep 17 00:00:00 2001 From: Edd Almond <102675624+eddalmond1@users.noreply.github.com> Date: Mon, 4 Aug 2025 12:13:54 +0100 Subject: [PATCH] trying an approach to ensure correct version of python used in lambda build --- scripts/dependencies.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh index 1977ab67a..215c241ac 100755 --- a/scripts/dependencies.sh +++ b/scripts/dependencies.sh @@ -2,11 +2,18 @@ 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