Skip to content

tesserocr: add build-tesserocr.yml for riscv64 wheels - #1821

Open
luhenry wants to merge 2 commits into
mainfrom
tesserocr
Open

tesserocr: add build-tesserocr.yml for riscv64 wheels#1821
luhenry wants to merge 2 commits into
mainfrom
tesserocr

Conversation

@luhenry

@luhenry luhenry commented Sep 12, 2026

Copy link
Copy Markdown
Member

Cython wrapper around the tesseract OCR engine and the leptonica image library. Upstream publishes no riscv64 wheel.

Mirrors upstream's own build.yml.

Differs from upstream

  • Builds leptonica and tesseract from source via cmake - neither ships a riscv64 devel package
  • Fetches eng/osd tessdata in before-all - needed for the packaged suite to actually run OCR

Testing

  • Runs the packaged pytest suite, not just upstream's own import-only smoke test

License: Wheel bundles libleptonica (BSD-2-Clause) and libtesseract (Apache-2.0); their licence texts are added since upstream's own package ships neither.

Patches

  • 0001-package-the-leptonica-and-tesseract-licences-with-t.patch - Inappropriate [riscv64-specific build dependency]. Adds both licence texts so setuptools' default glob bundles them; reproduces off riscv64 too.

Built on cp312; results pending first CI run.

luhenry added a commit that referenced this pull request Sep 12, 2026
@luhenry
luhenry force-pushed the tesserocr branch 2 times, most recently from 2d4995a to 3759ec6 Compare September 12, 2026 13:38
luhenry added a commit that referenced this pull request Sep 12, 2026
pypi.riseproject.dev has never published a musllinux_riscv64 Pillow
wheel (manylinux_riscv64 only, plus a legacy untagged linux_riscv64
wheel for cp39-cp312 that pip happens to accept on musl too), so
PIP_ONLY_BINARY=cysignals,Pillow made cp313/cp314/cp314t-musllinux
fail outright installing the test-only Pillow dependency ("Could not
find a version that satisfies the requirement Pillow (from versions:
none)"). Drop Pillow from PIP_ONLY_BINARY so pip falls back to its
sdist there; the jpeg/png/tiff/webp/zlib -dev packages already
installed earlier in the same container for leptonica/tesseract cover
what Pillow's setup.py auto-detects and needs.
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