The win_amd64 wheels (meshpy 2025.1.1) are MinGW-built and don't bundle the MinGW runtime DLLs, so importing meshpy fails on a clean Windows Python:
ImportError: DLL load failed while importing _internals: The specified module could not be found.
Evidence
- The wheel ships
meshpy/_internals.cp312-win_amd64.dll.a — a GNU/MinGW import library, i.e. a MinGW build.
- The import table of
meshpy/_internals.cp312-win_amd64.pyd (via pefile) lists:
libgcc_s_seh-1.dll
libstdc++-6.dll
- and only system DLLs otherwise (
KERNEL32.dll, api-ms-win-crt-*, python312.dll).
- None of the MinGW runtime DLLs are bundled inside the wheel.
So on a clean Windows Python (no MinGW on PATH), libstdc++-6.dll / libgcc_s_seh-1.dll can't be found and _internals fails to load.
Reproduce
In a clean virtualenv on Windows (no MinGW on PATH):
pip install meshpy==2025.1.1
python -c "import meshpy.triangle"
# ImportError: DLL load failed while importing _internals: The specified module could not be found.
Impact
Breaks pip install meshpy on Windows for anyone without a MinGW toolchain on PATH. In particular it breaks pip install anuga on Windows, since ANUGA depends on meshpy as its mesh generator.
Suggested fix
Run delvewheel repair on the Windows wheels in the release build to bundle the MinGW runtime DLLs (libstdc++-6.dll, libgcc_s_seh-1.dll, and libwinpthread-1.dll), making the wheels self-contained — the Windows equivalent of auditwheel (Linux) and delocate (macOS).
Environment
- meshpy 2025.1.1
- Python 3.12
- Windows (GitHub
windows-latest runner)
The
win_amd64wheels (meshpy 2025.1.1) are MinGW-built and don't bundle the MinGW runtime DLLs, so importing meshpy fails on a clean Windows Python:Evidence
meshpy/_internals.cp312-win_amd64.dll.a— a GNU/MinGW import library, i.e. a MinGW build.meshpy/_internals.cp312-win_amd64.pyd(viapefile) lists:libgcc_s_seh-1.dlllibstdc++-6.dllKERNEL32.dll,api-ms-win-crt-*,python312.dll).So on a clean Windows Python (no MinGW on
PATH),libstdc++-6.dll/libgcc_s_seh-1.dllcan't be found and_internalsfails to load.Reproduce
In a clean virtualenv on Windows (no MinGW on
PATH):Impact
Breaks
pip install meshpyon Windows for anyone without a MinGW toolchain onPATH. In particular it breakspip install anugaon Windows, since ANUGA depends on meshpy as its mesh generator.Suggested fix
Run
delvewheelrepairon the Windows wheels in the release build to bundle the MinGW runtime DLLs (libstdc++-6.dll,libgcc_s_seh-1.dll, andlibwinpthread-1.dll), making the wheels self-contained — the Windows equivalent ofauditwheel(Linux) anddelocate(macOS).Environment
windows-latestrunner)