Repository navigation
ci: add Windows build (MSYS2/mingw-w64) - #20
Merged
Merged
Conversation
Build the netsnmp C extension on Windows using the MSYS2 mingw-w64 toolchain, which provides net-snmp (with net-snmp-config), gcc and a matching Python so setup.py works unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KG1c9XtKawkvig5PnZjC8
net-snmp is not packaged for Windows in MSYS2, vcpkg or conda-forge, so build the client library from source into the mingw64 prefix. This puts net-snmp-config on PATH so setup.py works unchanged. Result is cached. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KG1c9XtKawkvig5PnZjC8
- setup.py: invoke net-snmp-config via sh on Windows (cmd.exe cannot exec the shell script) and link ws2_32 for the winsock symbols. - client_intf.c: use winsock2.h/ws2tcpip.h instead of arpa/inet.h and netdb.h on _WIN32. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KG1c9XtKawkvig5PnZjC8
setup-msys2 installs to $RUNNER_TEMP\msys64, not C:\msys64, so the cache never matched and net-snmp was rebuilt every run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KG1c9XtKawkvig5PnZjC8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions job that builds the netsnmp C extension on Windows using the MSYS2 mingw-w64 toolchain.
net-snmp-config, sosetup.pyworks unchanged🤖 Generated with Claude Code