Skip to content

Bump libxml2/libxslt/lxml; add recipe-bump skill#48

Merged
FeodorFitsner merged 4 commits intopython3.12from
lxml-bump
May 5, 2026
Merged

Bump libxml2/libxslt/lxml; add recipe-bump skill#48
FeodorFitsner merged 4 commits intopython3.12from
lxml-bump

Conversation

@FeodorFitsner
Copy link
Copy Markdown

Summary

  • flet-libxml2 2.9.8 → 2.15.3, flet-libxslt 1.1.32 → 1.1.45, lxml 5.3.0 → 6.1.0.
  • Each recipe now drives version + URL + host pins + patch selection from a single Jinja block at the top of `meta.yaml` (numpy/libopaque-style `# {% ... %}` comment-prefixed form), so flipping the `{% set version %}` line restores the previous pin in lockstep.
  • Replace the monolithic `mobile.patch` files in libxml2/libxslt with version-suffixed patches (`mobile-2.9.x.patch` + `mobile-2.15.x.patch`, etc.). The new `2.15.x` and `1.1.45` patches only carry an `ios-simulator*` case for modern `config.sub`; the old `docb*` / `xmlDllMain` symbol tweaks are unnecessary against current upstream.
  • `build.sh` cleanups made tolerant of layout changes (`shopt -s nullglob` + `rm -rf`); stop deleting `*.a` so iOS wheels (static-only build) actually ship libraries.
  • `flet-libxml2` build passes `--without-iconv` on Android (NDK bionic gains iconv at API 28; we target 24).
  • `flet-libxslt` build restricts `make` recursion to `libxslt libexslt`. `xsltproc` links `-lxml2` and on iOS the SDK's `libxml2.tbd` predates 1.1.45's use of `xmlCtxtParseDocument`/`xmlXPathValuePush`, so the CLI binary fails to link; the wheel only needs the libraries.
  • `lxml` recipe pins libxml2/libxslt versions conditionally (5.x stays paired with 2.9.8 + 1.1.32, since 5.x doesn't compile against 2.15 per upstream's CHANGES) and pushes `LDFLAGS=-liconv` via `script_env` on non-Android (lxml's `libraries()` list omits iconv).
  • New `.claude/skills/native-recipe-bumps/SKILL.md` documenting the conventions and the recurring cross-compile pitfalls so the next bump goes faster.

Test plan

  • `forge iOS flet-libxml2` succeeds for arm64 iphoneos, arm64/x86_64 iphonesimulator
  • `forge android flet-libxml2` succeeds for all 4 archs (arm64-v8a, armeabi-v7a, x86_64, x86)
  • `forge iOS flet-libxslt` and `forge android flet-libxslt` succeed; resulting wheels' `opt/lib` contains `libxslt.{a,so}` and `libexslt.{a,so}`
  • `forge iOS lxml` and `forge android lxml` succeed; `lxml.etree` import test still works in the testbed
  • `forge iphoneos:arm64 flet-libxml2:2.9.8` (override) still builds with the renamed `mobile-2.9.x.patch`

Drive the source URL and patch selection from a single Jinja version
variable so switching back to 2.9.8 still builds. Replace the old
mobile.patch (config.sub iOS triplets + libxml2.syms tweaks for the
2.9 layout) with two version-targeted patches: mobile-2.9.x.patch
keeps the original content, mobile-2.15.x.patch only teaches the
modernized config.sub about *-apple-ios-simulator.

build.sh: pass --without-iconv on Android (NDK bionic lacks iconv
until API 28; 2.15.x makes it mandatory by default while 2.9.x
silently soft-failed). Make the post-install cleanup tolerate the
2.15.x layout where share/ is no longer created and globs may not
match (nullglob + rm -rf).
flet-libxslt: drive version, libxml2 host requirement, and patch
selection from a single Jinja block (numpy-style). Replace the old
mobile.patch (config.sub iOS triplets for the 1.1.32 layout) with
two version-targeted patches: mobile-1.1.32.patch keeps the original
content, mobile-1.1.45.patch only teaches the modernized config.sub
about *-apple-ios-simulator. 1.1.45 pulls in flet-libxml2 2.15.3 to
satisfy its >= 2.15.1 requirement.

build.sh: only recurse into libxslt/libexslt subdirs. xsltproc links
-lxml2 and on iOS the SDK's libxml2.tbd predates 1.1.45's use of
xmlCtxtParseDocument / xmlXPathValuePush, so the CLI binary fails to
link; the wheel only needs the libraries. Same cleanup robustness
fix as libxml2 (nullglob + rm -rf).

flet-libxml2 + flet-libxslt build.sh: stop deleting *.a from the
wheel's lib/. iOS only builds static libs, so the previous cleanup
left lib/ empty and forced downstream packages onto dynamic_lookup
or the SDK stub. Android only builds shared libs (no *.a produced),
so this is a no-op there.

flet-libxml2/meta.yaml: switch to the comment-prefixed Jinja idiom
(# {% ... %}) so YAML linters parse it cleanly, matching numpy and
flet-libxslt.
Drive version, libxml2/libxslt host pinning, and the iOS-only
LDFLAGS=-liconv from a single Jinja block. lxml 5.x doesn't compile
against libxml2 2.15 (per upstream's CHANGES) so the older lxml
version stays paired with libxml2 2.9.8 / libxslt 1.1.32.

iOS libxml2.a now references iconv (it's built --with-iconv against
the system libiconv), and lxml's libraries() list omits iconv on
non-Windows non-static builds. Add -liconv via script_env LDFLAGS
on iOS only — Android's libxml2 is built --without-iconv and doesn't
need it.

The existing mobile.patch (filter MacOSX SDK include path out of
xml2-config --cflags) still applies cleanly to 6.1.0.
Captures the conventions used while bumping flet-libxml2 (2.9.8 →
2.15.3), flet-libxslt (1.1.32 → 1.1.45), and lxml (5.3.0 → 6.1.0):
the comment-prefixed Jinja idiom for version-conditional meta.yaml
(URL, host pins, patch filename in one block), the build.sh quirks
that bit us (bash 3.2 + set -u, nullglob cleanup, keeping *.a in
the wheel, SUBDIRS overrides, --without-iconv on Android), the
pitfall catalogue (iOS SDK libxml2.tbd, lxml's missing -liconv,
config.sub ios-simulator gap, libxml2.syms removed in 2.10), and
the forge CLI surface for re-running builds.
@FeodorFitsner FeodorFitsner merged commit cbcb145 into python3.12 May 5, 2026
5 of 7 checks passed
@FeodorFitsner FeodorFitsner deleted the lxml-bump branch May 5, 2026 00:17
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.

1 participant