-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Windows Wheels #19
Comments
I was thinking along the same lines - only didn't open a ticket as I'm not going to have any free time starting in about 2 weeks. This is definitely a way forward if we want .WHL builds, using VS (which we do, since Python built with MingW is not compatible with the default VS built python when it comes to binary modules like PyCairo). |
Thanks. Any help appreciated. If mingw builds are easier, they still can help prevent general Windows build/test breakage for starters. For MSVC builds and wheels etc I'm wondering who would be installing them? Would a cairo build be required and where would you get one? Should cairo be bundled in the wheel somehow? |
Starting with mingw builds definitely makes sense, if it's too much hassle now then adding MSVC to appveyor later is a definite possibility. I think the wheel contains the _cairo.pyd, which is pycairo + cairo (have a look at the mingw build on http://www.lfd.uci.edu/~gohlke/pythonlibs/ and older non WHL builds for MSVC.) I looked at _cairo.pyd in a resource viewer a while ago and it looked like it had all the cairo symbols, also the 1.3MB size seemed right for pycairo including cairo. Potential users are anyone on the default build of python on windows with an interest in pycairo, there are bits of code on the net for combining it with pygame, pyglet and other gaming engines for a start. |
OK, sounds good! |
Tests things under msys2
I've added some mingw test jobs |
Some things I've found:
|
Short status update:
Todo:
|
I can +1 this effort as my pyglet game would like an easier way for people to use it without having to install a C compiler. (if you were wondering who would use the results of this) at present i don't have a Windows machine to test on or a MacOS but would be happy to have wheels for both available so when someone goes to install my game from PyPI it pulls in the binary wheels for pygobject/pycairo. |
Having the precompiled wheel would also be extremely useful when setting up pycairo dependencies for GitHub actions on windows ;) So far I've been using https://www.lfd.uci.edu/~gohlke/pythonlibs/, but the URLs seem to change every once in a while. |
I think it would be great if pycairo had wheels available for linux, mac, and windows and would greatly increase the usability. Right now I can't add Now that Github Actions offers free linux/mac/windows workers, it should be much easier to create binary wheels. I maintain a package that builds wheels for linux/mac/windows (still using travis for now): https://github.com/openai/procgen/blob/master/.travis.yml and it's great for the user experience and reduces the number of issues filed about installation failures. cibuildwheel now supports github actions so it should be fairly easy to setup: https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions @lazka any thoughts on this? |
I think it is quite important to create windows binaries at least as they don't have C compilers installed by default. For that, setting up a CI is good. Also, I tried compiling it on Travis and install the binaries on my computer. I installed it successfully but on running the example I get the below error. Also, I just found a small fix for it. Looks like |
Using github actions + cibuildwheel makes this pretty easy, mostly just copying and pasting the example file, see this other python project: ICRAR/crc32c#16 |
Maybe something is missing out in |
I tried and it @christopherhesse The problem with that was it needs seperate compiled Cairo for 32 bit and 64 bit PC. So this creates some problems. Need to check it. Maybe it doesn't support it. Idk. |
What's the issue with that? Can't you have one folder with the cairo dll for 32 bit and another with the 64 bit and then copy it to the correct place before packaging? |
That causes quite a lot of problems. Because 32-bit is compatible with 32-bit os only likewise 64-bit. |
I'm not sure that's accurate, there are wheels here for windows: https://www.lfd.uci.edu/~gohlke/pythonlibs/ 32 bit and 64 bit, and each one has a cario.dll in it. I presume that the packager copied the correct DLL into the package folder before creating the wheel. |
I just find the way to do it without using cibuildwheel for windows using Travis. I downloaded it to my PC and the script in ran without any error. @christopherhesse I just don't know how to proceed with linux nor Mac. |
ebassi suggested it and has some example code here: https://github.com/anholt/libepoxy/blob/master/.appveyor.yml
The text was updated successfully, but these errors were encountered: