Skip to content

Build linux i686 and windows arm64 wheels - #20

Closed
ddelange wants to merge 5 commits into
abi3-wheelsfrom
win-arm64-linux-i686
Closed

ddelange wants to merge 5 commits into
abi3-wheelsfrom
win-arm64-linux-i686

Conversation

@ddelange

@ddelange ddelange commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Adds linux i686 and windows arm64 wheels to ahupp#294, in separate commits so they can be cherry-picked instead of squashed:

  1. Build libmagic from source on windows: add_libmagic.sh now runs in MSYS2 like it does on linux and macos (CIBW_BEFORE_BUILD_WINDOWS), instead of bundling the MSYS2 file package. That package is a dead end: current MSYS2 no longer ships mingw-w64-i686-file, its last build crashes (0xC0000409) on any magic_file call, and 5.47 breaks from_buffer (from_buffer() issue with file-5.47 ahupp/python-magic#362). libmagic now links the UCRT like python does (ucrt64 instead of mingw64, and -mcrtdll=ucrt on win32), which fixes from_descriptor (Bad file descriptor) in the windows wheels. Only the DLLs libmagic actually imports are bundled (ntldd -R), instead of the hardcoded flattened package dependency tree. The script changes are inert outside MSYS2: --prefix="${MINGW_PREFIX:-/usr/local}" and one DLL copy line.
  2. Run test suite against all wheels: one CIBW_TEST_COMMAND running pytest against the installed wheel on every platform. The inline smoke test moves into the suite as test_from_buffer_hls_mp4. On Windows, test data is checked out without CRLF conversion (.gitattributes), and the suite skips what libmagic does not support there (symlinks, non-ANSI paths).
  3. Build linux i686 wheels (manylinux2014 and musllinux_1_1): libmagic 5.46 built from source passes the test suite on both, so the old *Invalid datetime* failure (ahupp@ca4def3) is gone.
  4. Build windows arm64 wheels: built natively on windows-11-arm (pythonarm64 3.12) with the MSYS2 clangarm64 toolchain.

🤖 Generated with Claude Code

@ddelange ddelange closed this Oct 17, 2026
@ddelange ddelange reopened this Oct 17, 2026
@ddelange
ddelange force-pushed the win-arm64-linux-i686 branch 3 times, most recently from 1577731 to 08373ce Compare October 17, 2026 14:55
Run add_libmagic.sh in MSYS2 like on linux and macos, instead of bundling the MSYS2 file package: current MSYS2 no longer ships mingw-w64-i686-file, its last build crashes (0xC0000409) on any magic_file call, and 5.47 breaks from_buffer ref ahupp#362

Link the UCRT like python does (ucrt64, and -mcrtdll=ucrt on win32), which fixes from_descriptor (Bad file descriptor).

Bundle only the DLLs libmagic actually imports (ntldd -R), instead of the flattened package dependency tree.
Replaces the inline smoke test, which moves into the suite as test_from_buffer_hls_mp4 (also guards ahupp#362).

On Windows: check out test data without CRLF conversion, and skip what libmagic does not support there (symlinks, non-ANSI paths).
libmagic 5.46 built from source passes the test suite on manylinux2014_i686 and musllinux_1_1_i686.
Built natively on the windows-11-arm runner with the MSYS2 clangarm64 toolchain.
@ddelange
ddelange force-pushed the win-arm64-linux-i686 branch from 08373ce to 13a5942 Compare October 17, 2026 15:32
5.48 fixes the from_buffer regression of 5.47 ref ahupp#362 (guarded by test_from_buffer_hls_mp4).

5.48 identifies parquet files (application/vnd.apache.parquet, Apache Parquet file).
@ddelange

Copy link
Copy Markdown
Owner Author

Cherry-picked onto abi3-wheels for ahupp#294 (307a1b0..780186b).

@ddelange ddelange closed this Oct 17, 2026
@ddelange
ddelange deleted the win-arm64-linux-i686 branch October 17, 2026 16:51
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