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

CI failure because of missing cairo #382

Open
claudep opened this issue Jun 24, 2023 · 9 comments
Open

CI failure because of missing cairo #382

claudep opened this issue Jun 24, 2023 · 9 comments

Comments

@claudep
Copy link
Collaborator

claudep commented Jun 24, 2023

Tests on GitHub CI fail currently because of missing cairo dependencies (and hence png output is not available).

@claudep
Copy link
Collaborator Author

claudep commented Jun 24, 2023

We may set reportlab[pycairo] in requirements.txt, but should we also add the ability to optionally install it, like reportlab, by using extra_require?

@deeplook
Copy link
Owner

We could set a hard dependecy on pycairo only for reportlab>=4.0.0 like mentioned in this example.

@claudep
Copy link
Collaborator Author

claudep commented Jun 25, 2023

My question was about keeping pycairo as optional even with recent reportlab. As cairo installation is not trivial on some platforms, maybe people who just want to use svglib to produce pdf (and no png), cairo installation may not be a hard dependency.

@deeplook
Copy link
Owner

deeplook commented Jun 25, 2023

Yes, I agree it should be optional with a hint about getting it installed for reportlab>=4 and the trouble to expect. Still, it would be nice to have it work inside github actions, though.

@MrBitBucket
Copy link

The problem with actually using rlPyCairo (ie pycairo) is that pycairo does not build installable wheels for most platforms. That forces all the linux / unixy platforms to compile their own.

Part of the reason for splitting the bitmap stuff out of reportlab was to reduce the skills required to maintain it going forward. I can just about hack the github cibuildwheel stuff to obtain windows/manylinux/osx wheels which we did up to 4.0, but my continued participation is not guaranteed.

If testing is all that's needed then a good start would be

https://github.com/pygobject/pycairo/blob/main/.github/workflows/test.yml

which actually needs to build pycairo prior to testing it. Presumably svglib with reportlab+rlPyCairo would need to build/install libcairo(-dev), pycairo, rlPyCairo & reportlab.

I got very fed up with yml doing wheel building for reportlab, I have no doubt the same will be true for testing.

@deeplook
Copy link
Owner

deeplook commented Jul 2, 2023

@MrBitBucket I guess we could limit the tests run by GitHub actions only to those platforms known to work fine with pycairo. I remember I had some issues with it in a different context, but I forgot the details. I've tried to find out which warnings regarding pycairo I'd see in the installation descriptions in reportlab 4.x, and I could not find any in the archive I get from https://pypi.org/project/reportlab/#files (there is only a sentence naming pycairo as a dependency for bitmap images with text).

It seems somewhat unfortunate to me the the reportlab source code is not available on github or gitlab so it could be easy to comment and/or discuss. It might be on bitbucket, but I just failed to find it there, too...

@claudep
Copy link
Collaborator Author

claudep commented Jul 2, 2023

@deeplook, reportlab is hosted here: https://hg.reportlab.com/hg-public/reportlab/ with a mirror here: https://github.com/MrBitBucket/reportlab-mirror (thanks @MrBitBucket :-)) But no comments/discussions in either place (except the mailing list).

@deeplook
Copy link
Owner

@claudep @MrBitBucket I knew I had seen this repo before somewhere, but I was unable to find it quickly when I searched for it, indicating it's not easy to find from https://www.reportlab.com/support/, and in fact, I still cannot find that link anywhere. Searching on GitHub gives a lot of repos, but ok, maybe my bad.

Anyway, I think we should stop building on platforms that have issues with Cairo/PyCairo given pygobject/pycairo#320, and "go green" again.

@deeplook
Copy link
Owner

How can we work around this if pygobject/pycairo#320 is not moving forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants