Repository navigation
Conversation
added 30 commits
March 18, 2023 12:24
We used to generate our wheels in a very hacky way, by: - manually downloading libzim binaries into a dedicated location - building the extension, manipulating the LD_LIBRARY_PATH - manipulate the build directory to place libzim binary inside - eventually creating the wheel It was: - not straightforward. - unclear what the outcome was - often bundling libzim in sdist - not integratable with other tools This now builds correct wheels and source using an in-setup-only process.
Running QA, then tests on a handful of targets and getting coverage
- Building wheels on 3.7 to 3.11 - Testing on CPython 3.7 to 3.11 - Testing all wheels via cibuildwheel - Excluding PyPy
Replaced the release-only release workflow with a new wheels one that serves 2 purposes: - Build all supported wheels + sdist on every push/PR to ensure publication is not affected - Additionnaly publish those to PyPI if triggered via a release
Although cibuildwheel specifies the target arch for each of its builds, a regular user would attempt to build with `python3 -m build`, defaulting to universal2 This adds support for this use case, by downloading the two archs libzim and creating a universal libzim before building the universal extension.
Using /usr/bin/env prefix, codefactor is happy as it's now an absolute path yet it's still using the user's environment, allowing overrides, which we'd prefer. Also disables urlopen warning as we control the url protocol
Add credentials-aware signing keychain for macOS signing requests all (macOS) builds to sign
Split wheels workflow into: - wheels workflow ran on PRs to ensure we can build properly - release workflow with release environment that builds and uploads to PyPI
Better build system
Latest test (accented) requires post 8.2.0 libzim to work.
Accented search
added 17 commits
October 25, 2026 17:19
Fix openzim#232 Adds a new illustration module with the IllustrationInfo value object, and new width/height/scale-aware illustration APIs: - writer.Creator.add_illustration(content, width, height=None, scale=1.0) and add_illustration_info(content, info) for full control (e.g. extra attributes), mirroring libzim's own IllustrationInfo-based overload - reader.Archive.get_illustration_item(width=None, height=None, scale=None) and get_illustration_item_info(info), with the same shortcut/mirror split - reader.Archive.get_illustrations_info(width=None, height=None, min_scale=None) to discover available illustrations IllustrationInfo is an immutable namedtuple-based value object: width/height/scale/extra_attributes are read-only, extra_attributes is defensively copied into an immutable mapping on construction, and changing a value means building a new instance (e.g. via `._replace()`). as_metadata_item_name/from_metadata_item_name bridge to libzim's own C++ implementation for correctness.
Add support for new illustrations APIs in libzim 9.4.0
…title Add test for Archive.get_entry_by_title with distinct title and title…
…id-public Make Archive.get_entry_by_id public and deprecate _get_entry_by_id
…pers Add tests for indexdata helper functions
…ch-and-snippets Support multi-archive search and SearchResult with snippets
Date conversion was removed in openzim#190 but the type stub still advertised datetime.date and datetime.datetime.
Upgrade dependencies
…ution SuggestionSearch and SuggestionResultSet were declared in the type stubs but not exported by libzim.suggestion at runtime, so importing them failed. create_module reused its name argument as loop variable, so each submodule was also registered in sys.modules under its last member name (e.g. sys.modules['Searcher']).
- set_cluster_cache_max_size parameter is size_in_bytes, not nb_clusters - IllustrationInfo accepts extra_attributes=None - declare enum members with values so type checkers see them as members - declare __all__ and mark Cython extension classes as disjoint bases - fix .pyx annotations: implicit Optional, and config methods returning Self
- mypy.stubtest checks names, parameters and defaults - check_stub_annotations compares stubs annotations with the ones Cython keeps on compiled functions, which stubtest does not check
Check type stubs against compiled module, fix detected drifts
pawank925
marked this pull request as draft
October 28, 2026 01:39
pawank925
force-pushed
the
split-writer-reader
branch
from
October 28, 2026 01:55
985563a to
1a442d2
Compare
pawank925
marked this pull request as ready for review
October 28, 2026 02:21
pawank925
force-pushed
the
split-writer-reader
branch
from
October 28, 2026 02:30
d2c8a52 to
d23d15d
Compare
Contributor
Author
|
tested it here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits writer/reader parts to support libzim built without writer support (e.g. Android). When LIBZIM_WITHOUT_WRITER is detected or writer headers/symbols unavailable, writer module is created as empty/dummy or not fully functional. Adds writer as optional extra, guards C++ bindings, updates tests to skip when writer unavailable.