Skip to content

Windows (win_amd64) wheels - #1

Closed
AmyJeanes wants to merge 7 commits into
masterfrom
windows
Closed

Windows (win_amd64) wheels#1
AmyJeanes wants to merge 7 commits into
masterfrom
windows

Conversation

@AmyJeanes

Copy link
Copy Markdown
Owner

Fork-internal draft PR: runs comma's ci.yml on the windows branch (all four matrix platforms on GitHub-hosted runners) to validate the upstreamable part before anything goes to commaai.

The last three commits (libdatachannel-py, publish_windows.sh, the windows release workflow) are fork-only and would be dropped from an upstream PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt

@AmyJeanes
AmyJeanes force-pushed the windows branch 6 times, most recently from 66111b7 to 6d09058 Compare September 7, 2026 09:18
Tag wheels win_amd64, resolve bash through PATH (CreateProcess searches
System32 first, which would launch the WSL bash), pass the build.sh path
with forward slashes since MSYS2 bash treats backslashes as escapes, and
hand the build interpreter to build.sh as PYTHON so scripts stop assuming
a python3 on PATH.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes and others added 6 commits September 7, 2026 23:12
Per-package changes so every build.sh runs in an MSYS2 CLANG64 shell:
- capnproto/ffmpeg/git-lfs/gcc-arm-none-eabi: .exe names, Windows
  archives, and native C:/ prefixes for pkgconf; ffmpeg is built static
  so consumers do not need DLL search path handling
- acados: GENERIC BLASFEO/HPIPM targets (the x86 assembly kernels assume
  the SysV ABI), the pinned tera_renderer release binary instead of a
  rust toolchain, Windows venv layout when vendoring casadi
- zeromq: no AF_UNIX transport on MinGW (afunix.h is MSVC only)
- raylib: desktop backend with clang and the mingw distutils compiler,
  configured through a tracked build_ext config file; the cffi build
  output under raylib/Release is ignored
- ncurses: PDCurses' console port shipped under the ncurses names,
  decided before the ncurses tarball would be downloaded
- shims: run binaries via subprocess on Windows, os.exec* cannot replace
  the process there

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
replay selects AV_HWDEVICE_TYPE_D3D11VA on Windows; that needs the
h264/hevc d3d11va2 hwaccels, which share their objects with the legacy
d3d11va ones, so both variants are enabled. Only the mingw SDK headers are
needed, no extra libraries.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
The venv's interpreter lives in Scripts/ there, and MSYS2 puts its own
mingw CPython first on PATH, so pin uv to the managed 3.12 the wheels
are built for.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
capnp and cppcheck linked libc++ dynamically, so they only ran from a
shell with the MSYS2 CLANG64 bin directory on PATH; link them -static
like ffmpeg. cppcheck also gets the subprocess shim the other packages
use on Windows (os.execvp cannot replace the process there), and the
capnproto smoketest joins PATH with os.pathsep so it runs there too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
pacman installs the toolchain and build tools by MINGW_PACKAGE_PREFIX;
the other MSYS2 environments are refused since the wheels rely on
clang, lld and libc++. .gitattributes keeps the scripts LF on Windows
checkouts.

The uv shell installer unpacks with unzip, which a fresh MSYS2 lacks (a
native unzip on PATH cannot open MSYS paths). MSYS2's git package is not
installed: openpilot's venv git-lfs cannot drive that Cygwin-style git,
so Git for Windows on the inherited PATH is the git for both repos.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
A fourth matrix entry builds on windows-latest in an MSYS2 CLANG64 shell
with the runner's PATH inherited; ./setup.sh installs the pacman
packages. Only that entry names its shell: the job's run default falls
back to `bash -e {0}`, GitHub's implicit default, so the Linux and macOS
steps are unchanged. A `test windows` job installs the wheels into a venv
of a stock Python with no MSYS2 on PATH and runs the smoketests, the
Windows counterpart of the distro-container test: it is the only place a
wheel that still depends on the toolchain's DLLs fails. The publish job
then uploads the Windows wheels to PyPI with the others (bootstrap-icons
is a py3-none-any duplicate, which --skip-existing drops).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
@AmyJeanes

Copy link
Copy Markdown
Owner Author

Superseded by the upstream PR: commaai#107

@AmyJeanes AmyJeanes closed this Sep 7, 2026
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