marcelotduarte/cx_Freeze

ModuleNotFoundError: No module named '_overlapped'

gbtami opened this issue · 1 comments

We use cx_Freeze on MSYS2 environment to produce .msi installer for https://github.com/pychess/pychess
Before publishing a new release I downloaded the generated .msi github artifact to test it on my Win10, but unfortunately it failed to start.
msi

As you can see in the Build step of https://github.com/pychess/pychess/actions/runs/8820031832/job/24212678376
there is no "_overlapped.cp311-mingw_x86_64.pyd" mentioned anywhere in the log at all.

Interestingly when I run
python setup.py bdist_msi
in my local MSYS2 install (it has older package versions of everything compared to current, for example python 3.10.10 and cx_Freeze 6.14.6) it works OK.

I think this line https://github.com/marcelotduarte/cx_Freeze/blob/main/cx_Freeze/hooks/asyncio.py#L24
is the root of the problem, because IS_WINDOWS is possible False (and IS_MINGW64 is True in case of MSYS2)

Yes, you are right.
I backported the fix to MSYS: msys2/MINGW-packages#20730