Skip to content

Fix #299: swap Debian and Fedora libzim package names in README - #300

Open
Huyvux12 wants to merge 3 commits into
openzim:mainfrom
Huyvux12:fix-299-system-libzim-packages
Open

Huyvux12 wants to merge 3 commits into
openzim:mainfrom
Huyvux12:fix-299-system-libzim-packages

Conversation

@Huyvux12

Copy link
Copy Markdown

Fixes #299.

The README's system-libzim block told Debian users to install libzim-devel and Fedora users to install libzim-dev. The names are backwards: Debian's development package is libzim-dev, Fedora's is libzim-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.py default LIBZIM_DL_VERSION=9.8.2-1, pinned in CI). An older distribution package — e.g. libzim-dev 8.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 of USE_SYSTEM_LIBZIM=1.

Verification (before / after)

Base: upstream main @ 57555c29 ("Prepare for 4.1.1").

Before (reproduced on Ubuntu 24.04 here):

After: README now contains apt-get install libzim-dev # debian and dnf install libzim-devel # fedora, and no longer contains the swapped names (asserted by script). The brew install libzim line 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.

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.
Comment thread README.md Outdated
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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rewrite it in a more generic way, maybe by exposing the limitation instead of the symptoms?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@rgaudin rgaudin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now ; thank you

Comment thread README.md Outdated
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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@benoit74 benoit74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.56%. Comparing base (57555c2) to head (140373c).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System build instructions swap the Debian and Fedora package names

3 participants