From fd238a1ce4b1cd144a0fc9ee332176a044d64222 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Mon, 22 Dec 2025 12:27:01 +0100 Subject: [PATCH 1/3] fix relative-path problem --- bin/stack-config | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/stack-config b/bin/stack-config index 31a700e..83e5c2d 100755 --- a/bin/stack-config +++ b/bin/stack-config @@ -1,6 +1,11 @@ #!/usr/bin/env bash -export UV_PROJECT_ENVIRONMENT=.venv-`uname -m` - +# determine the root directory of the stackinator project STACKINATOR_ROOT=$(dirname `realpath $0`)/.. -uv run --directory $STACKINATOR_ROOT --with . python -m stackinator.main $@ + +# Notes: +# - --project: make `uv run` run in "project" mode, using the specified project directory +# - UV_PROJECT_ENVIRONMENT: specify a custom name for the project virtual environment, based on the architecture (avoiding conflicts between x86_64 and arm64) + +export UV_PROJECT_ENVIRONMENT=.venv-`uname -m` +uv run --project $STACKINATOR_ROOT --with $STACKINATOR_ROOT python -m stackinator.main $@ From 5a3ff4e486a6dc63ad552889caf1455b1e83c4de Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Mon, 22 Dec 2025 12:29:20 +0100 Subject: [PATCH 2/3] install it as editable so that it is in sync with the repository without need to reinstall --- bin/stack-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/stack-config b/bin/stack-config index 83e5c2d..6a9d19e 100755 --- a/bin/stack-config +++ b/bin/stack-config @@ -5,7 +5,8 @@ STACKINATOR_ROOT=$(dirname `realpath $0`)/.. # Notes: # - --project: make `uv run` run in "project" mode, using the specified project directory +# - --with-editable: install the project in editable mode, so that changes to the source code are reflected immediately without needing to reinstall # - UV_PROJECT_ENVIRONMENT: specify a custom name for the project virtual environment, based on the architecture (avoiding conflicts between x86_64 and arm64) export UV_PROJECT_ENVIRONMENT=.venv-`uname -m` -uv run --project $STACKINATOR_ROOT --with $STACKINATOR_ROOT python -m stackinator.main $@ +uv run --project $STACKINATOR_ROOT --with-editable $STACKINATOR_ROOT python -m stackinator.main $@ From 2c6d67a01cbef733dd955dccd57296b30540d76f Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Mon, 22 Dec 2025 15:17:47 +0100 Subject: [PATCH 3/3] no need to install it using `--with` uv run in "package mode" already installs the project in the venv --- bin/stack-config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/stack-config b/bin/stack-config index 6a9d19e..7215049 100755 --- a/bin/stack-config +++ b/bin/stack-config @@ -5,8 +5,7 @@ STACKINATOR_ROOT=$(dirname `realpath $0`)/.. # Notes: # - --project: make `uv run` run in "project" mode, using the specified project directory -# - --with-editable: install the project in editable mode, so that changes to the source code are reflected immediately without needing to reinstall # - UV_PROJECT_ENVIRONMENT: specify a custom name for the project virtual environment, based on the architecture (avoiding conflicts between x86_64 and arm64) export UV_PROJECT_ENVIRONMENT=.venv-`uname -m` -uv run --project $STACKINATOR_ROOT --with-editable $STACKINATOR_ROOT python -m stackinator.main $@ +uv run --project $STACKINATOR_ROOT stack-config $@