Skip to content

cvcpkg: Windows columns for pycvc, pycvc-gl, arix and ariglx recipes - #1196

Merged
transfix merged 5 commits into
masterfrom
feat/ox-win-hosts
Nov 13, 2026
Merged

transfix merged 5 commits into
masterfrom
feat/ox-win-hosts

Conversation

@transfix

Copy link
Copy Markdown
Owner

N1, part 1 (docs/roadmap/ARIADNE_SCRIPTING_HOSTS.md, §10 Phases, the N1 row): Windows columns for the packages the Windows x hosts need. Every one of them is on cvcpkg.org for Windows except pycvc-cp312 and pycvc-gl-cp312, and neither could pack there.

What it adds

  • pycvc-cp31X and pycvc-gl-cp31X (cp311, cp312, cp313). package.files named only lib/python3.X/site-packages/..., which matches nothing in a Windows install (Lib/site-packages), so the Windows pack failed strict-globs ("package.files declares 2 entries that match nothing"). Each spelling is now a {glob, platforms} entry scoped to its platforms; pycvc-gl-cp312 keeps its wasm columns on the POSIX spelling. build.ps1 now names its interpreter as build.sh does: the first <root>\python.exe of CVC_DEPS_PREFIX then CVC_BUILD_PREFIX that reports the column's version, with its numpy headers and Python3_FIND_REGISTRY=NEVER, and it throws when no root has one. The column comes from CVC_PYTHON_INTERPRETER, CVC_COMPONENT (the recipe name) or the script's recipe dir. Every source that names a column must agree, and the script throws when none does. (The earlier script fell back to python311 without CVC_PYTHON_INTERPRETER, which cvcpkg's Windows-host delegated build does not export.) pycvc-gl's script builds the scene module alone (CORE=OFF), as build.sh does. The six scripts are byte-identical within each kind. The -cuda peers are left alone.
  • arix, ariglx, arisrvx. Each gets a build.ps1 and a windows matrix row. The scripts run build.sh's steps inline: configure src/ari, src/arigl or src/arisrv with Python on (and wasm on for arix and ariglx), then build and install only the host's own target and component. That keeps ari.exe, ari-media.exe, arigl.exe and arisrv.exe out of the bundles. The interpreter is the deps roots' 3.12 with Python3_FIND_REGISTRY=NEVER. They refuse a python312 without bin\python312.dll, or one whose bin\python3.dll forwards anywhere but python312. That means 3.12.10+cvc.22 or later: cvc.21 has the DLL, but its python3.dll forwards to python313. The files are bin/arix*, bin/ariglx* and bin/arisrvx*, and arix and ariglx also ship bin/wasmtime.dll.
  • bindings/pycvc/CMakeLists.txt. Under Emscripten the site dir is now lib/pythonX.Y/site-packages, the wasm CPython's layout, on every build host. Before, it asked Python3_EXECUTABLE, which in a wasm build is the build host's native interpreter. A Windows host's answered Lib/site-packages, so pycvc-gl-cp312's host_platform: windows wasm rows staged pycvc_gl where the wasm package.files entry matched nothing.
  • Roadmap: the N1 row records part 1 and what is left.

How it was tested (locally on Windows, release/shared)

These ran against a prefix of cvcpkg.org bundles: python312 3.12.10+cvc.25, numpy-cp312 2.4.6+cvc.6, vtk-python-cp312 9.5.0+cvc.8 and wasmtime 45.0.0+cvc.1. The scripts named below are local scripts on the build box, not part of this PR.

  • Rebuild: build-ox-win-hosts.bat for pycvc-cp312, pycvc-gl-cp312, arix, ariglx and arisrvx: 5/5 exit 0. Each reconfigured. ninja had no work to do, since no compiled source changed for native builds.
  • pycvc-cp312 build.ps1 in the winhost-shaped environment (CVC_COMPONENT=pycvc-cp312, CVC_PYTHON_INTERPRETER unset): exit 0, bound Python 3.12.
  • smoke-ox-win-hosts.ps1 (arix + ariglx), from an installed-layout prefix with no PYTHONHOME or PYTHONPATH and only the system dirs on PATH: 8 passed, 0 failed.
  • smoke-ox-win-hosts.ps1 -Only arisrvx: 2 passed, 0 failed.
  • cvcpkg 2.5.14 validate: 9/9 recipes pass.
  • ox-win-hosts-globcheck.py (every recipe's package.files against each platform's staged layout): 0 failures over all 9 recipes and every matrix platform.
  • cvcpkg 2.5.14 Windows pack of pycvc-cp312, pycvc-gl-cp312, arix, ariglx and arisrvx: 5/5 packed (pack only, nothing published).
  • ox-win-hosts-coltest.ps1 (the column derivation, run on the real script with a stubbed env-windows.ps1): 11 passed, 0 failed. The previous script (b54c258) derived python311 3.11 in the winhost environment.
  • Negative: master's pycvc-cp313/build.ps1 with CVC_PYTHON_INTERPRETER=python313 against the python312-only prefix exits 0, binds 3.12.10, and its _pycvc.pyd imports python312.dll. The new script exits 1 with "no python.exe for Python 3.13 (python313)" and creates no build dir.
  • Negative: arix, ariglx and arisrvx build.ps1 against the python312 3.12.10+cvc.21 prefix: 3/3 throw "bin\python3.dll forwards to python313" before any configure.
  • Negative: the same three with that prefix's bin\python312.dll moved aside: 3/3 throw "has no bin\python312.dll" before any configure (the DLL was restored afterwards).
  • Windows-hosted emscripten, before and after the CMake change (configure, build of the pycvc and pycvc_gl archives, install): before, the tree staged Lib/site-packages and the wasm pack of pycvc-gl-cp312 (--host-platform windows) failed strict-globs. After, it staged lib/python3.12/site-packages and the pack succeeded (1 fail before, 1 pass after, as expected).
  • git-clang-format 18.1.8 --diff a5fbd479: no modified files to format (no C++ changed).

No PR CI job runs these build.ps1 scripts until the part-2 publish lanes exist.

What is left out

  • The wasmtime.dll overlap. arix and ariglx both ship bin/wasmtime.dll, because the Windows wasmtime bundle keeps its DLL in lib\. cvcpkg does not make that overlap safe:

    • Extraction is last-writer-wins.
    • A loaded DLL can't be replaced.
    • cvcpkg uninstall of one host keeps the path only while the other's archive is in the local download cache.

    The preferred fix is a cvcpkg wasmtime bundle with wasmtime.dll in bin\. That needs a cy-pca/cvcpkg recipe change and a publish, both out of scope here. So this PR only corrects the recipe comments and records it as a required follow-up, and bin/wasmtime.dll stays in arix's and ariglx's package.files.

  • cvcpkg winhost._job_env exporting CVC_PYTHON_ABI and CVC_PYTHON_INTERPRETER. Also a cy-pca/cvcpkg change, left as a follow-up. The scripts here derive the column without them.

  • The cp311 and cp313 columns are not built yet: there is no 3.11 or 3.13 prefix here. They were edited, not built, and the roadmap row says so.

  • The pycvc build.sh files keep their own python311 fallback. This change covers only build.ps1, and the native builders export the variable.

  • The Windows publish lanes (part 2), and macOS.

Merging waits on Joe's review.

#1159 (O7c) kept the last source sea_surface found in a thread_local, so
the velocity a fluid field reads after a cell's height at the same point
and time did not invert the sideways move again. A thread_local that
keeps state between calls is a static cache, which libcvc's no-singletons
rule forbids (VOLROVER-LIBRARY-PORTS-ROADMAP.md 1.3,
tools/singleton_scan). #1159's release-grpc job, where the scan runs, was
cancelled, so the scan never judged it; the next PR that merges master
would fail that lane on it.

The memo now belongs to the caller:

- sea_surface::source_memo, and height() / velocity() overloads that take
  one. The plain reads share nothing.
- fluid_surface::height_with / velocity_with and a surface_memo the
  caller owns; the defaults ignore it. ocean_surface passes it to the sea.
- field_set::apply keeps one memo per cell, for the cell's height and its
  velocity at the same clipped centre.

The memo is keyed on the point, the time and the digest as before, so
every value is unchanged.
N1, part 1. Every package the Windows x hosts need is on cvcpkg.org for
Windows except pycvc-cp312 and pycvc-gl-cp312, and neither could pack there:

- Their package.files named only lib/python3.X/site-packages/..., which
  matches nothing in a Windows install (Lib/site-packages), so the pack's
  strict-globs check failed it ("package.files declares 2 entries that
  match nothing"). The cp311 lane breaks the same way. Each spelling is now
  a {glob, platforms} entry scoped to its platforms; no file suffix tells
  them apart, so the builder's suffix heuristic cannot. pycvc-gl-cp312 keeps
  its wasm columns on the POSIX spelling.
- Their build.ps1 named no interpreter. FindPython3 then takes the first
  python.exe under CMAKE_PREFIX_PATH, of any version, and with none there a
  registry Python. build.ps1 now does what build.sh does: it derives the
  version from CVC_PYTHON_INTERPRETER, takes the first <root>\python.exe of
  CVC_DEPS_PREFIX then CVC_BUILD_PREFIX that reports it, passes it with its
  numpy headers and Python3_FIND_REGISTRY=NEVER, and throws when no root has
  one. pycvc-gl's also builds the scene module alone (CORE=OFF), as build.sh
  does, instead of a second copy of the core module.

These fixes cover the cp311, cp312 and cp313 core and gl columns; the six
scripts stay byte-identical within each kind. The -cuda peers carry the same
globs but different scripts and are left alone.

arix and ariglx get a build.ps1 and a windows matrix row. The scripts run
build.sh's steps inline rather than Invoke-CvcCMakeBuild, which would build
and install ari.exe, ari-media.exe or arigl.exe into the bundle too: configure
src/ari or src/arigl with -D..._WITH_PYTHON=ON and -D..._WITH_WASM=ON, build
and install only the host's target and component, then rewrite install paths.
They refuse a python312 without bin\python312.dll (bundles before
3.12.10+cvc.21), which would leave bin\arix.exe dying with 0xC0000135. The
files are bin/arix* (or bin/ariglx*) and bin/wasmtime.dll: the Windows
wasmtime bundle keeps its DLL in lib\, so the host's install component copies
it beside the exe, and both packages ship that copy until a wasmtime bundle
puts it in bin\.

The roadmap's N1 row records part 1; the Windows publish lanes and macOS are
left.

Tests: locally on Windows, release/shared, against a prefix of cvcpkg.org
bundles (python312 3.12.10+cvc.25, numpy-cp312 2.4.6+cvc.6, vtk-python-cp312
9.5.0+cvc.8, wasmtime 45.0.0+cvc.1): libcvc, cvcgl, pycvc-cp312,
pycvc-gl-cp312 (VTK bridge on), arix and ariglx each built by its own
build.ps1 with Python3 at the prefix's python.exe; cvcpkg 2.5.14 validate
passes for all eight recipes; master's pycvc-cp312 recipe fails the Windows
pack with "2 entries that match nothing" and the fixed one packs, as do
pycvc-gl-cp312, arix and ariglx (packed only, never published); a check of
every recipe's package.files against each platform's staged layout passes on
linux, macos, windows, wasm and wasm-mt. From one installed-layout prefix
with no PYTHONHOME, no PYTHONPATH and only the system dirs on PATH: arix
python reports arix 3.12.10 2.4.6 <prefix> with pycvc imported; arix test
runs python_block.ari (5 tests) and wasm_block.ari (6 tests); ariglx checks
both documents, snapshots app.py (result 14, a PNG) and imports pycvc_gl
with vtkmodules. With bin\python312.dll moved aside, arix fails 0xC0000135.
arisrvx needs no pycvc, so it can join arix and ariglx on Windows now.
build.ps1 runs build.sh's steps as arix's does: src/arisrv with
-DARISRV_WITH_PYTHON=ON, the arisrvx target and install component alone (no
arisrv.exe in the bundle), the 3.12 interpreter named from the deps roots with
Python3_FIND_REGISTRY=NEVER, and a python312 without bin\python312.dll refused.
The files entry becomes bin/arisrvx*, matching bin/arisrvx and
bin/arisrvx.exe.

Tests: locally on Windows, release/shared, built by build.ps1 against the
worktree's libcvc and python312 3.12.10+cvc.25 (Python3 at the prefix's
python.exe); cvcpkg 2.5.14 validate passes; the Windows pack passes (packed
only, never published) where master's bin/arisrvx entry matches nothing. From
the installed-layout prefix with no PYTHONHOME and only the system dirs on
PATH: arisrvx python reports arisrvx 3.12.10, and arisrvx --python
src/arisrv/tests/program.py --room smoke --state-listen 127.0.0.1:0
--media-listen 127.0.0.1:0 --ws-listen 127.0.0.1:0 prints "program: the
relay applied".
The wasm site dir. bindings/pycvc asked Python3_EXECUTABLE for its
site-packages dir, and in a wasm build that is the build host's native
interpreter: on a Windows host it answers Lib/site-packages, so
pycvc-gl-cp312's two host_platform: windows wasm rows staged pycvc_gl
where the recipe's wasm entry (lib/python3.12/site-packages) matches
nothing, and their pack failed strict-globs. Under Emscripten the site
dir is now lib/pythonX.Y/site-packages, the wasm CPython's layout, on
every build host.

The interpreter column. The six pycvc-cp31X / pycvc-gl-cp31X build.ps1
fell back to python311 without CVC_PYTHON_INTERPRETER, which cvcpkg's
Windows-host delegated build (winhost._job_env) does not export, so the
cp312 and cp313 columns looked for a 3.11. The column now comes from
CVC_PYTHON_INTERPRETER, CVC_COMPONENT (the recipe name) or the script's
recipe dir; all that name one must agree, and none naming one throws.

The python312 floor. arix, ariglx and arisrvx build.ps1 said
3.12.10+cvc.22 but checked only for bin\python312.dll, which cvc.21 has
too, with a python3.dll forwarding every export to python313.dll. They
now also read bin\python3.dll's forwarder strings and require python312
alone; the arix and arisrvx recipe comments say cvc.22.

The wasmtime.dll overlap. arix and ariglx both ship bin/wasmtime.dll.
The recipe comments said cvcpkg's uninstall keeps a shared path; it does
so only while the other package's archive is in the local download
cache, extraction is last-writer-wins, and a loaded DLL can't be
replaced. They now say so, and that a wasmtime bundle with the DLL in
bin\ is a required follow-up.

The roadmap's N1 row says only cp312 was built and smoke-tested (cp311
and cp313 were edited, not built), and adds arisrvx.

Tests: locally on Windows, release/shared, against cvcpkg.org bundles
(python312 3.12.10+cvc.25, numpy-cp312 2.4.6+cvc.6, vtk-python-cp312
9.5.0+cvc.8, wasmtime 45.0.0+cvc.1). pycvc-cp312, pycvc-gl-cp312, arix,
ariglx and arisrvx re-ran through their build.ps1 (reconfigured, nothing
to recompile), pycvc-cp312 once more in a winhost job's environment
(CVC_COMPONENT only), binding 3.12; cvcpkg 2.5.14 validates all nine
recipes and packs the five for Windows (packed only, never published);
the per-platform package.files check passes; the installed-layout smoke
passes all ten checks. The column logic passes eleven cases on its own
(each source alone, none, two disagreements, a malformed name), where
the previous script derived 3.11 in the winhost environment.
Negative runs: master's pycvc-cp313/build.ps1 with
CVC_PYTHON_INTERPRETER=python313 against a python312-only prefix exits
0, with a _pycvc.pyd importing python312.dll, where the new script
throws "no python.exe for Python 3.13"; arix, ariglx and arisrvx
build.ps1 against the cvcpkg.org python312 3.12.10+cvc.21 bundle throw
on its python3.dll, and with its bin\python312.dll moved aside throw on
that, each before any configure. A Windows-hosted emscripten tree of
cvc, cvcGL, pycvc and pycvc_gl (native python.exe as FindPython3's
interpreter) staged pycvc_gl in Lib/site-packages before the fix and in
lib/python3.12/site-packages after it, and cvcpkg 2.5.14's wasm pack
of pycvc-gl-cp312 with --host-platform windows fails strict-globs on
the first stage and packs the second (packed only, never published).
No PR CI job runs these build.ps1 scripts until the part-2 publish
lanes exist.
@transfix
transfix enabled auto-merge (squash) November 13, 2026 03:54
@transfix
transfix merged commit 9f77fad into master Nov 13, 2026
30 of 33 checks passed
@transfix
transfix deleted the feat/ox-win-hosts branch November 13, 2026 08:27
transfix added a commit that referenced this pull request Nov 13, 2026
transfix added a commit that referenced this pull request Nov 13, 2026
The one conflict was arigl_web_smoke.mjs. Both sides are kept:
- the /apps/up endpoint, with #1200's ISOLATION headers on its replies as on every response;
- the settle probe reads out and isolated/sab;
- each case runs its before/inject and #1200's isolation check.
The headless-Chrome smoke passes 6/6 here, the picked-file upload included.
Master since then: #1179, #1174, #1196, #1198, #1178, #1157, #1172, #1200.
transfix added a commit that referenced this pull request Nov 26, 2026
…t 2), arigl on macOS (#1554)

* publish-cvcpkg: the x hosts on Windows and macOS, and arigl on macOS

cp312 matrix rows for windows-2022, macos-15 and macos-15-intel build what the
scripting hosts need there, as the linux cp312 job does:
- Windows: pycvc-cp312, pycvc-gl-cp312, arix, arisrvx and ariglx, each by its
  recipe's build.ps1 (#1196), checked from an install-shaped prefix with no
  PYTHONHOME, no PYTHONPATH and the system dirs alone on PATH
  (.github/scripts/windows-xhost.ps1).
- macOS: pycvc-cp312, arix and arisrvx, with the linux checks under dyld.
The 311 macOS job also builds arigl against its cvcGL. A missing VTK on an
experimental row now skips only cvcgl and arigl, not pycvc.

cvcgl's Windows step builds the shared cvcGL alone in the cp312 job and packs
nothing, so cvcgl still publishes once.

Recipes: macos rows for arix, arisrvx, arigl and cvcgl; ariglx names its
macOS blocker (vtk-python-cp312 has no macos row in cy-pca/cvcpkg).

* publish-cvcpkg: a linux arm64 cp312 row (experimental), as the arm64 base row is

pycvc-cp312, arix, arisrvx and ariglx had linux x86_64 bundles only, though
python312, numpy-cp312, vtk-python-cp312 and wasmtime all have linux arm64
ones. The Linux cp312 steps are platform-generic, so the row only has to exist.

* publish-cvcpkg: pycvc-gl-cp312 and ariglx on macOS, once vtk-python-cp312 is

The macOS cp312 jobs install vtk and vtk-python-cp312 when the catalog has them
for macOS (cy-pca/cvcpkg#638 adds the recipe row), and then build the shared
cvcGL for linking (packing nothing, as on Linux), pycvc-gl-cp312 (which must
import with VTK's Python) and ariglx (the Windows lane's --terminal checks,
under dyld). Without them the three skip with a warning on every row, so the
lanes come on by themselves once the bundle is published.

pycvc-gl-cp312's recipe gets a macos row and its libcvc, cvcgl and pycvc deps
scoped to macos too; ariglx's gets a macos row.

* install-cvcpkg-swig: take the Windows bundle's bin/Lib layout too

The Windows swig bundle (4.4.1+cvc.6) has SWIG's own Windows layout, its
library in bin\Lib\ beside swig.exe, not share/swig/<version>/. The action
only knew the second, so the first Windows job to run it (the cp312 row's)
failed with "found 0". It now falls back to bin/Lib/swig.swg when there is no
share/swig/*/swig.swg, and exports that as SWIG_LIB.

Checked against the installed Windows bundle: it finds bin/Lib, swig.exe
reports 4.4.1 with that SWIG_LIB, and generates a Python wrapper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant