Open claudep opened 1 year ago
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
?
We could set a hard dependecy on pycairo
only for reportlab>=4.0.0
like mentioned in this example.
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.
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.
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.
@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...
@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).
@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 https://github.com/pygobject/pycairo/issues/320, and "go green" again.
How can we work around this if https://github.com/pygobject/pycairo/issues/320 is not moving forward?
Tests on GitHub CI fail currently because of missing cairo dependencies (and hence png output is not available).