Repository navigation
Conversation
Debian's development package is libzim-dev and Fedora's is libzim-devel; the README had them backwards. Also note that a system build requires C++ libzim 9.x (bundled build is 9.8.2) and point users with older distro packages (e.g. libzim-dev 8.2.1 on Ubuntu 24.04) to the bundled build.
| python3 -m build --wheel | ||
| ``` | ||
|
|
||
| Building against a system libzim requires C++ libzim 9.x: python-libzim has built against libzim 9 since 3.3.0 and the bundled build downloads 9.8.2, so an older distribution package — for example `libzim-dev` 8.2.1 on Ubuntu 24.04 — lacks headers this version uses (e.g. `zim/illustration.h`). If your distribution only ships an older libzim, use the default bundled build instead of `USE_SYSTEM_LIBZIM=1`. |
There was a problem hiding this comment.
Can you rewrite it in a more generic way, maybe by exposing the limitation instead of the symptoms?
There was a problem hiding this comment.
Done — rewrote the note to state the limitation instead of the symptoms: a system build needs a C++ libzim compatible with this release (9.x), distributions do not all ship one recent enough, and in that case the bundled build should be used. Dropped the Ubuntu 24.04 / 8.2.1 / zim/illustration.h specifics. The package-name swap itself is unchanged. Pushed as 14a2d4a.
Drop the distro-specific symptoms (Ubuntu 24.04's 8.2.1 package, the missing zim/illustration.h header) and instead state the limitation itself: a system build needs a libzim compatible with this release (9.x), and distributions do not all ship one recent enough, in which case the bundled build should be used.
| python3 -m build --wheel | ||
| ``` | ||
|
|
||
| Building against a system libzim requires a C++ libzim compatible with this release (9.x — the bundled build uses 9.8.2). Distributions do not all ship a recent enough libzim, so if yours only provides an older one, use the default bundled build instead of `USE_SYSTEM_LIBZIM=1`. |
There was a problem hiding this comment.
I find it is still a bit too obscure, I had to read it three times to understand the point.
What about this instead:
Setting `USE_SYSTEM_LIBZIM=1` builds against the libzim installed on your system, which must be a version compatible with this version of python-libzim. Many distributions ship an older libzim. If yours does, leave `USE_SYSTEM_LIBZIM` unset, and the build will download and bundle a compatible libzim automatically.
There was a problem hiding this comment.
Applied your wording verbatim — the note now says setting USE_SYSTEM_LIBZIM=1 builds against the system libzim (which must be a compatible version), many distributions ship an older libzim, and leaving it unset downloads and bundles a compatible one automatically. Pushed as 140373c. No conflict with rgaudin's earlier request: the wording stays generic (no distro-specific symptoms) while stating the point directly, as you asked.
Adopt the wording proposed in review: setting USE_SYSTEM_LIBZIM=1 builds against the system libzim, which must be a compatible version, and leaving it unset downloads and bundles a compatible libzim automatically. This keeps the note generic (per rgaudin's earlier review) while stating the point directly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
=======================================
Coverage 95.56% 95.56%
=======================================
Files 1 1
Lines 676 676
=======================================
Hits 646 646
Misses 30 30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #299.
The README's system-libzim block told Debian users to install
libzim-develand Fedora users to installlibzim-dev. The names are backwards: Debian's development package islibzim-dev, Fedora's islibzim-devel.Changes
README.md: swap the two package names (apt-get install libzim-dev # debian,dnf install libzim-devel # fedora).README.md: document the C++ libzim version a system build needs — 9.x. python-libzim has built against libzim 9 since 3.3.0 (CHANGELOG: 3.3.0 "Using C++ libzim 9.0.0", every release since on 9.x) and the bundled build downloads 9.8.2 (setup.pydefaultLIBZIM_DL_VERSION=9.8.2-1, pinned in CI). An older distribution package — e.g.libzim-dev8.2.1 on Ubuntu 24.04 — lacks headers this version uses (e.g.zim/illustration.h,libzim/zim.pxd:30); the note points those users to the default bundled build instead ofUSE_SYSTEM_LIBZIM=1.Verification (before / after)
Base: upstream
main@57555c29("Prepare for 4.1.1").Before (reproduced on Ubuntu 24.04 here):
apt-get --simulate install libzim-devel→ exit 100,E: Unable to locate package libzim-devel.apt-cache policy libzim-dev→ candidate8.2.1-2build1from noble/universe.libzim-dev; Fedora's package islibzim-devel(9.8.2 on Fedora 45, 9.4.1 on Fedora 44, 9.2.3 on Fedora 43).After: README now contains
apt-get install libzim-dev # debiananddnf install libzim-devel # fedora, and no longer contains the swapped names (asserted by script). Thebrew install libzimline is unchanged.Control cases: Debian stable's 9.2.3 satisfies the 9.x requirement, so Debian-stable users are fine with a system build; only older distro packages (Ubuntu 24.04's 8.2.1) fall under the "use the bundled build" note. Fedora's packaged versions are all 9.x.
Regression / scope
Docs-only change, one file (
README.md, +4/−2). No code changed, so no test suite applies; there is no README/markdown lint in CI or pre-commit (pre-commit covers trailing-whitespace/EOF, black, ruff, pyright — none touch this edit, and the one pre-existing trailing-whitespace line elsewhere in the README was left alone). Full builds on Debian and Fedora were not tested, as noted in the issue.Closes #299.