Skip to content
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

Create wheels #141

Closed
stuaxo opened this issue Dec 11, 2019 · 8 comments
Closed

Create wheels #141

stuaxo opened this issue Dec 11, 2019 · 8 comments
Labels

Comments

@stuaxo
Copy link

stuaxo commented Dec 11, 2019

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.

@liZe
Copy link
Member

liZe commented Mar 29, 2020

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.

@liZe
Copy link
Member

liZe commented Apr 12, 2020

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.

@liZe liZe changed the title Improving installation (Was - create manylinux package). Create wheels Apr 12, 2020
@naveen521kk
Copy link
Contributor

Possibly, including a cairo.dll in the whl file would do. See how this site has wheels for cairocffi.

@stuaxo
Copy link
Author

stuaxo commented Sep 22, 2020

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.

@naveen521kk
Copy link
Contributor

naveen521kk commented Sep 22, 2020

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
pygobject/pycairo#191 and pygobject/pycairo#196

@Korijn
Copy link

Korijn commented Oct 19, 2022

Just dropping a hint here that cibuildwheel can make this work much easier!

@liZe
Copy link
Member

liZe commented Oct 22, 2022

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.

@liZe
Copy link
Member

liZe commented Mar 11, 2023

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!

@liZe liZe closed this as completed Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants