GrammaticalFramework/gf-core

Python binding on Windows

nardi opened this issue · 4 comments

nardi commented

Has anyone managed to build and use the Python binding to PGF on Windows?

I gave it a shot, but the difficulty seems to be that "regular" Python on Windows requires you to use the MSVC compiler, and when I try to build the pgf package using that things seem to go very wrong. I first built the C runtime on mingw (the result of which should be usable outside a mingw environment), but even with that available running the setup.py script just gave me a bunch of errors from MSVC.

I'll look into it further, but I'm just curious whether anyone has managed to do this in the first place ;)

nardi commented

I managed to build a wheel for CPython 3.9 and win64, I'll attach it here for anyone who could use it.
It took some messing around, but apparently you CAN build Python extensions using mingw, it's just "not supported"...?
This document was a large help: https://github.com/Roche/pyreadstat/blob/master/windows_compilation.md
It would be cool if Windows builds could be automatically included on pypi, but I'm not sure how to best get the build process working systematically :)

pgf-1.0-cp39-cp39-win_amd64.zip

Thanks for the report and about sharing your findings! Unfortunately none of the core GF team has a Windows machine, so the functionalities on Windows are somewhat neglected. Should we link the wheel from the GF main website or from github?

@nardi
Did you get this issue after installing the wheel and trying to import the package?

image