Create wheels
This is a ticket to chat about improving installation -
Originally I was going to suggest a manylinux WHL.. but I'm not convinced this is as possible, after having a bit of a play with trying to do this with pycairo.
The problem with using manylinux, is that cairo compiled with the standard options pulls in too many dependencies, since all backends are enabled.
My current thinking is that going to cairo itself and working out how to split up the backends could be an interesting option.
Originally I was going to suggest a manylinux WHL.. but I'm not convinced this is as possible, after having a bit of a play with trying to do this with pycairo.
Cairocffi used to have a wheel package, but as a file has to be generated during installation depending on the Cairo version installed, it was removed.
But. As Cairo’s API is somehow backwards-compatible, we could try to generate and distribute the file generated with the latest version of cairo, and hope that it works for previous versions too. Features added in a recent version of cairocffi would not work with an old version of cairo (probably with an ugly error), but that’s already the case without the wheel. This could fix #140 too.
But. As Cairo’s API is somehow backwards-compatible, we could try to generate and distribute the file generated with the latest version of cairo, and hope that it works for previous versions too.
It probably won’t, because we currently use the ABI level, not the API level, as we don’t want users to install a C compiler.
Possibly, including a cairo.dll in the whl file would do. See how this site has wheels for cairocffi.
When I opened this I was looking at the possibility of using cairocffi in a docker container where I couldn't use a compiler, so Linux not Windows*.
The cairo.dll that you helped get added to pycairo for the next release is statically linked to some of the other dependencies, which may or may not help jhere.
*Not that a WHL wouldn't be a bad thing here.
The cairo.dll that you helped get added to pycairo for the next release is statically linked to some of the other dependencies, which may or may not help jhere.
Possibly generating one through msys doesn't hurt. But that for windows.
Linking those pycairo https://github.com/pygobject/pycairo/pull/191 and https://github.com/pygobject/pycairo/pull/196
Just dropping a hint here that cibuildwheel can make this work much easier!
Just dropping a hint here that cibuildwheel can make this work much easier!
Thanks for the link.
The problem is not that it’s hard to build a wheel. The problem is that a file has to be generated when CairoCFFI is installed, and this file may depend on the version of Cairo installed on the system. So, if we keep this behavior, we can’t use wheels because we can’t build different wheels for different versions of Cairo.
As we need to generate files at installation time, we can’t build wheels (as far as we know). If someone’s sure that there’s a reliable solution to build a wheel, please open a new issue!