pypdfium2-team / pypdfium2

Python bindings to PDFium
https://pypdfium2.readthedocs.io/
349 stars 15 forks source link

conda: consider reading pdfium-binaries version from system? #283

Closed mara004 closed 9 months ago

mara004 commented 9 months ago

Currently we're reading the pdfium-binaries version from a version file bundled in pypdfium2_raw. This is inflexible if we ever wanted to relax the ABI pinning at some point, and also a bit problematic if there were dependency breakage.

On the other hand, the bundled version file reflects the API of the version the bindings were built for, which can even be more significant than the real pdfium version, so we'd need to expose both info, e.g. using a dedicated bindings version class.

However, this would be fairly complicated/confusing, and as I doubt if there's a fast and portable way of reading the version from the conda env, I'd probably leave it as-is for now. Anyway, ABI safety/correctness is a touchy subject, so I also don't think we would want to move away from the pinning.