From 402158516779a7e81c7ae0eb19b1f08e4ffc5ccd Mon Sep 17 00:00:00 2001 From: Joe Rivera Date: Wed, 19 Aug 2026 19:38:41 -0500 Subject: [PATCH 1/2] ci(windows): install python311 + pin find_package(Python3) for volrover3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit python311 is now published for windows (the windows_pycvc binding stack landed), so the stale 'skip python311 on windows' guard is obsolete — install it on every platform. Also pin -DPython3_EXECUTABLE/-DPython3_ROOT_DIR at the cvcpkg prefix's python.exe so find_package(Python3 Development.Embed) uses the hermetic cvcpkg python311 instead of the runner's setup-python 3.12 (which set Python3_ROOT_DIR in the env). Fixes 'volrover3: embedded Python escaped the dependency prefix'. --- .github/workflows/publish-cvcpkg.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-cvcpkg.yml b/.github/workflows/publish-cvcpkg.yml index caee4d0..8105500 100644 --- a/.github/workflows/publish-cvcpkg.yml +++ b/.github/workflows/publish-cvcpkg.yml @@ -418,14 +418,12 @@ jobs: # so install it explicitly. (It was dropped when the python packages moved # to per-interpreter -cp3XX columns; the SDK closure no longer carries it.) # - # python311 is published for linux + macos but NOT windows (windows python - # packaging is still experimental — see the windows_pycvc input). Request it - # only where it exists; windows volrover3 stays blocked at the hermeticity - # guard until a windows python3XX is published, which is fine — the whole - # build-volrover3 job is continue-on-error. - py_dep=() - if [ "${{ matrix.platform }}" != "windows" ]; then py_dep=(python311); fi - cvcpkg install libcvc vtk cvcgl yaml-cpp "${py_dep[@]}" \ + # python311 is now published on every platform including windows (the + # windows_pycvc binding stack landed 2026-08-19), so install the embedded + # interpreter everywhere — the CMakeLists hermeticity guard requires the + # app to embed the SAME python3XX the prefix's pycvc/pycvc-gl were built + # against, not the runner's system python. + cvcpkg install libcvc vtk cvcgl yaml-cpp python311 \ --prefix "$GITHUB_WORKSPACE/cvc-deps" \ --platform "${{ matrix.platform }}" \ --config release \ @@ -454,6 +452,9 @@ jobs: -DVOLROVER_RELEASE=ON ` -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -DCMAKE_PREFIX_PATH="${{ github.workspace }}\cvc-deps;$env:Qt6_DIR" ` + -DPython3_EXECUTABLE="${{ github.workspace }}\cvc-deps\python.exe" ` + -DPython3_ROOT_DIR="${{ github.workspace }}\cvc-deps" ` + -DPython3_FIND_STRATEGY=LOCATION ` -DUSE_QT6=ON ` -DDISABLE_CGAL=ON ` -DBUILD_VOLROVER3=ON ` From e9bcf6a2832791a94bbb1e7ea73cd51597786c18 Mon Sep 17 00:00:00 2001 From: Joe Rivera Date: Wed, 19 Aug 2026 21:00:13 -0500 Subject: [PATCH 2/2] volrover3(cmake): hermeticity guard checks ANY prefix entry, not just [0] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The embedded-python guard did list(GET CMAKE_PREFIX_PATH 0) and required python to live under that one entry. On Windows the vcpkg toolchain PREPENDS its own prefix (C:/vcpkg/installed/x64-windows) at index 0, so the check false-failed ('embedded Python escaped the dependency prefix') even though the cvcpkg python311 was correctly found under a LATER cvc-deps entry. Iterate all CMAKE_PREFIX_PATH entries and accept if python resolves under any — a system/ registry python is under none, so hermeticity is still enforced. --- volrover3/CMakeLists.txt | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/volrover3/CMakeLists.txt b/volrover3/CMakeLists.txt index 1344767..df6e0d3 100644 --- a/volrover3/CMakeLists.txt +++ b/volrover3/CMakeLists.txt @@ -75,15 +75,27 @@ endif() find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Embed) -if(_vr3_deps_prefix) - file(REAL_PATH "${_vr3_deps_prefix}" _vr3_prefix_real) +if(CMAKE_PREFIX_PATH) + # Accept the interpreter if it resolves under ANY CMAKE_PREFIX_PATH entry, not + # just the first. A toolchain can PREPEND its own prefix (vcpkg puts + # C:/vcpkg/installed/ at index 0), so a `list(GET ... 0)` check would + # false-fail even when the cvcpkg python is correctly under a later entry. A + # system/registry python is under none of them, so this still rejects it. file(REAL_PATH "${Python3_EXECUTABLE}" _vr3_python_real) - string(FIND "${_vr3_python_real}" "${_vr3_prefix_real}" _vr3_python_in_prefix) - if(NOT _vr3_python_in_prefix EQUAL 0) + set(_vr3_python_hermetic FALSE) + foreach(_vr3_p IN LISTS CMAKE_PREFIX_PATH) + file(REAL_PATH "${_vr3_p}" _vr3_p_real) + string(FIND "${_vr3_python_real}" "${_vr3_p_real}" _vr3_idx) + if(_vr3_idx EQUAL 0) + set(_vr3_python_hermetic TRUE) + break() + endif() + endforeach() + if(NOT _vr3_python_hermetic) message(FATAL_ERROR - "volrover3: embedded Python escaped the dependency prefix.\n" - " found: ${Python3_EXECUTABLE}\n" - " prefix: ${_vr3_deps_prefix}\n" + "volrover3: embedded Python escaped the dependency prefix(es).\n" + " found: ${Python3_EXECUTABLE}\n" + " prefixes: ${CMAKE_PREFIX_PATH}\n" "Linking a system interpreter breaks hermeticity: the app would embed a " "different python3XX.dll than the prefix's pycvc/pycvc-gl were built " "against. Install the python3XX cvcpkg package into the prefix.")