diff --git a/.devcontainer/onCreate-meson.sh b/.devcontainer/onCreate-meson.sh index 1a1c27735d2..ea5cc42140c 100755 --- a/.devcontainer/onCreate-meson.sh +++ b/.devcontainer/onCreate-meson.sh @@ -2,7 +2,7 @@ SYSTEM=$(build/bin/sage-guess-package-system) -if [ "$SYSTEM" = "fedora" ]; then +if [ "$SYSTEM" = "fedora" ] && [ -f /etc/fedora-release ]; then # Need to use --setopt=tsflags="" to avoid errors with gphelp dnf5 install -y pari-gp --setopt=tsflags="" @@ -16,7 +16,8 @@ eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missin # Disable build isolation following the advice of https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#build-dependencies # Install build dependencies manually as workaround for https://github.com/astral-sh/uv/issues/1516 -uv venv +uv venv --clear +. $UV_PROJECT_ENVIRONMENT/bin/activate # https://github.com/astral-sh/uv/issues/14022 uv pip install \ meson-python \ "cypari2 >=2.2.1" \ @@ -27,4 +28,4 @@ uv pip install \ "numpy >=1.25" \ jinja2 \ setuptools -uv sync --frozen --inexact --no-build-isolation --config-settings=builddir=build/build-$SYSTEM +uv sync --frozen --inexact --no-build-isolation -v --config-settings=builddir=build/build-$SYSTEM-$devcontainerId diff --git a/.devcontainer/portability-archlinux/devcontainer.json b/.devcontainer/portability-archlinux/devcontainer.json index f076a199e67..548cbb92274 100644 --- a/.devcontainer/portability-archlinux/devcontainer.json +++ b/.devcontainer/portability-archlinux/devcontainer.json @@ -13,6 +13,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-fedora-41/devcontainer.json b/.devcontainer/portability-fedora-41/devcontainer.json index cacc679fbbc..b166ba213c1 100644 --- a/.devcontainer/portability-fedora-41/devcontainer.json +++ b/.devcontainer/portability-fedora-41/devcontainer.json @@ -10,6 +10,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-fedora-42/devcontainer.json b/.devcontainer/portability-fedora-42/devcontainer.json index e433f7016de..a61c40adecd 100644 --- a/.devcontainer/portability-fedora-42/devcontainer.json +++ b/.devcontainer/portability-fedora-42/devcontainer.json @@ -10,6 +10,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-ubuntu-2204/devcontainer.json b/.devcontainer/portability-ubuntu-2204/devcontainer.json index d393b1630b8..602cc83bd28 100644 --- a/.devcontainer/portability-ubuntu-2204/devcontainer.json +++ b/.devcontainer/portability-ubuntu-2204/devcontainer.json @@ -10,6 +10,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-ubuntu-2404/devcontainer.json b/.devcontainer/portability-ubuntu-2404/devcontainer.json index e5e7f58127c..7aee083cd88 100644 --- a/.devcontainer/portability-ubuntu-2404/devcontainer.json +++ b/.devcontainer/portability-ubuntu-2404/devcontainer.json @@ -10,6 +10,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-ubuntu-2504/devcontainer.json b/.devcontainer/portability-ubuntu-2504/devcontainer.json index e487931fe7e..01f7baeed4a 100644 --- a/.devcontainer/portability-ubuntu-2504/devcontainer.json +++ b/.devcontainer/portability-ubuntu-2504/devcontainer.json @@ -10,6 +10,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/portability-void/devcontainer.json b/.devcontainer/portability-void/devcontainer.json index 3024093fcd8..47a24fb5985 100644 --- a/.devcontainer/portability-void/devcontainer.json +++ b/.devcontainer/portability-void/devcontainer.json @@ -14,6 +14,10 @@ "version": "latest" } }, + "containerEnv": { + "devcontainerId": "${devcontainerId}", + "UV_PROJECT_ENVIRONMENT": ".venv-${devcontainerId}" + }, "customizations": { "vscode": { "extensions": [