Fix wrong platform inclusion for mingw64

Words
117
Reading
1 min
Listen
Play
9y

Expected behavior

pip3 install neovim should work on mingw64 mintty session.

Actual behavior

Neovim python client requires greenlet. Because greenlet does not support mingw64, it crashes as greenlet mistakenly selects switch_amd64_unix.h for mingw64. The crash is due to the fact that sizeof(long) is different on UNIX and MINGW64, 8 and 4, respectively.

How to reproduce

  • Install 64-bit MSYS2.
  • Start a mingw64 session.
  • Install python3 and pip3 for mingw64 (not for msys2) using pacman.
  • Run pip3 install neovim and it will crash.

Here are my first and second attempts to fix greenlet for mingw64. The second PR is merged. If you git clone the merged branch you can now build it with python3 setup.py build and install with python3 setup.py install. After installation pip3 install neovim works.



Posted on Utopian.io - Rewarding Open Source Contributors

Fix wrong platform inclusion for mingw64 | Ecency