Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/publish-cvcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 `
Expand Down
26 changes: 19 additions & 7 deletions volrover3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/<triplet> 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.")
Expand Down
Loading