Repository navigation
Conversation
7e3bf7b to
3cce80a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #292 +/- ##
==========================================
+ Coverage 93.70% 95.28% +1.58%
==========================================
Files 1 1
Lines 635 636 +1
==========================================
+ Hits 595 606 +11
+ Misses 40 30 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hey @benoit74 — a design question on the approach for #287 before this goes further. #287 floated a pip
Rationale: one wheel keeps working against both kinds of libzim, and there is no extra whose availability has to be modeled per platform. Does this satisfy what you need for #283, or would you prefer the |
3a13b29 to
3803f8c
Compare
Cython cannot conditionally parse `cdef extern` blocks, so declare the writer API through a local shim header that only includes libzim's writer headers when the library was built with writer support. Guard the writer implementations (C++ wrappers, writer callbacks, Hint, Creator and the libzim.writer registration) with LIBZIM_WITHOUT_WRITER, and detect that build flag in setup.py once libzim is available. On a writer-less libzim the extension now builds and `import libzim.writer` raises ImportError, which is what Android/reader-only wheels need (openzim#283). Adds tests for lazy submodule loading and creator guards. Fixes openzim#287
3803f8c to
1f37944
Compare
Split writer/reader parts to support libzim built without writer (e.g. Android/reader-only builds).
Fixes #287