-
Notifications
You must be signed in to change notification settings - Fork 88
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
Build Windows wheels #191
Build Windows wheels #191
Conversation
+1 to this. |
+1! |
+1 👍 |
Thanks, for taking the time to put this together, having WHLs is a major help for Windows users. |
Any idea when will this be merged? Or maybe I should do any improvement or something? |
I have a chunk of time tomorrow I can give this a try and give any feedback. What's the best way to grab the WHLs, from Travis somehow? |
Ideally wouldn't you publish them to pypi? I assume Travis also has an artifact feature for publishing temporarily. |
For now, I have implemented it to put the whl's to a Draft Github Release. I think that is enough. Maybe if required I will implement it to upload it to PyPI directly. @stuaxo |
Having the wheels published to PyPi would solve all of my problems. I would then be able to have pycairo as a dependency without having to worry about my users having a C++ builder installed on their windows systems.... Currently, I have to resolve to the unofficial wheels on https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo |
Don't worry about publishing directly, I just want to have a quick poke at it... I've been a Cairo user on and off on Windows and Linux for a while so would like to give it a go. :) |
If you want to test it out you can visit this and download one for your system. I generated using this in my Fork.:) |
.travis/downloadCairo.sh
Outdated
@@ -0,0 +1,4 @@ | |||
|
|||
curl -L https://github.com/preshing/cairo-windows/releases/download/$CAIRO_VERSION/cairo-windows-$CAIRO_VERSION.zip -o cairocomplied.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an outdated cairo release :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing we can do now is to compile Cairo if we need the latest one. And btw the install script in cairo-windows is actually batch which Travis doesn't support :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. It's probably best to wait until https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/37 is merged and then build it ourselves using meson. But, yeah, let's not block this..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. It's probably best to wait until https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/37 is merged and then build it ourselves using meson. But, yeah, let's not block this..
FYI: It's been merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea that we would use meson to do the builds here, or is there some buildfarm attached to freedesk that we get the builds from ?
OT (ish)
About a week ago, I had a chat with dependencies.io and they came up with a patch that uses their bot to generate PRs to update cairo + freedesktop, for preshing, cairo when upstream changes. This isn't so relevant if we don't use preshing cairo, but I guess we can still setup something to generate PRs here when upstream updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SO what should be done?
Anything else should be done @lazka ? |
I seem to recall, the older windows pycairo builds included cairo.dll named as _cairo.dll Should this be the case for this WHL too? |
Anything else should be done @lazka ? |
Hi S |
Ok, then let me update. :) |
Cheers, I should have linked the ticket before, but I had no idea @preshing would be so responsive :) |
I am curious does this work the same on other operating systems? I tried the same in Google Colab(I don't have a Linux). But found it weird installing the wheel which generated using this script had no errors which running the examples. Idk whether this works on all systems. |
@stuaxo Done it. Any other thing to be done? |
Opps. I'm sorry if I'm late on this. |
Hi @naveen521kk
? EDIT: Is the reason that the PR is based on an older version of .travis.yml - the scripts: section looks a little different too ? |
Yup that's why I left it so. |
It's neat to have a batch script for it instead of having all in |
Ideally we should make each PR should add just one thing, with minimal changes (and of course passing tests). Windows WHLs: This is good work you've done getting all this all up and running, in some ways I made it a little dumber moving it to I made a PR to port your script to plain
Everything else is the same as the script, just moved into
TODO
Deployment
Meson
|
I really couldn't go much about it. Any help is appreciated. |
I don't think that's a big deal if we can't get meson working, for this. |
Yes, now the upstream repo has a release with tee surface. And all test pass. Also, I prefer GitHub Action over Travis(because powershell is lot familiar to me than bash). If you allow me @lazka can I use it. |
Thanks :) This can be two parts. I'll check the WHL stuff later when in from of a computer + hopefully squash and merge to here. I'm the meantime feel free to open a seperate ticket to discuss github actions. |
Since all tests are passing, I squashed and merged this, from the PR where with the bits and pieces we worked on to get it all into .travis.yml. Thanks for all the work to get this into shape. |
So @stuaxo when will we get wheels in pip? |
I don't have access to that, we will see if @lazka appears :) If I want to try this on my own branch should I just creating a release ? I tried this, creating a new tag, but it only has the source files in it, not the WHLs - is my setup missing something? |
I either missed being a maintainer earlier or it changed. Even if I could release I would still double check. This is either my first commit on pycairo or first in years, so I did double check it was all good first. If I can generate WHLs that I can download + then try them in a Windows VM then I'm happy to ask if we can pull the trigger, OTOH sounds like you already are. I'm probably over cautious as last place I worked was a huge corporation where we tried double hard not to break stuff, so hope I'm not slowing stuff down too much :) I'm definitely interested in the direction it goes, github actions look promising for instance. |
@stuaxo You can download the artifact here and check yourself. I have checked for my part on x64 and x86 and certify it works( Based of example in readme and tee surface test, so don't blame me). If you want or @lazka I will make an PR of that script of GitHub Action I made.( Maybe tomorrow). Just saying I need it on PyPi as soon as possible. |
Is it OK to rebase (or just recreate this branch), based off the pygobject/pycairo ? This make the histories consistent (imagine if I broke something when I squashed the previous commits) - it's also a good chance to squash or get rid of the commits like "another try"*. *I write a lot of these in my own branches :) |
I will do this in a new PR. You talking about actions right? |
Yep, what's currently the msys_actions branch. |
I will make a new PR in some 10 min. |
I've made a new release with those wheels now |
Fixes #19
This makes Travis build wheels and upload it to a draft Github Release. I tried downloading one that was built into my computer and it ran without any error for the example in ReadMe. This would for the installation of Pycairo for windows users who don't have C compilers.