Make pycairo optional
In some (many?) use cases, generating bitmaps is not needed, making the installation of cairo unnecessary. However since v1.6 the installation of svglib will fail, if cairo is not installed on the system.
Could pycairo be made an optional dependency to let the users choose if they need it or not?
Reportlab follows that approach already:
https://docs.reportlab.com/install/open_source_installation/
For the time being, we are stuck with v1.5.1 because of this issue.
Thank you for raising your first issue! Your help to improve svglib is much appreciated!
FWIW, I think it would be a good thing.
That makes a lot of sense. Cairo is basically solving the previous issues with libart when creating bitmaps. I'll look into it. Be aware that 1.6.0 was intended to be a "make-over" release without introducing new features.
+1 sticking with 1.5.1 because of pycairo requirement
+1 sticking with 1.5.1 because of pycairo requirement
Our main reason for using svglib is that it did not include cairo. We'll also be pinning.
We use SVGLib through other sub deps. We also pinned to 1.5.1 during upgrade. pycairo does not provide wheels for linux (explicitly).
I think that adding an heavy library that -explictly- requires changes to CI, CD and Host systems to run with native bindings (cairo) is terrible to do between "minor" upgrades. This is something I expect from a major change, like 2.0.0.
+1 on making it optional!