Skip to content

Commit

Permalink
replace unmaintained python-djvulibre with djvulibre-python
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichFroebel committed Dec 13, 2024
1 parent 40bff3e commit 8b3a379
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 51 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,7 @@ jobs:
main:
strategy:
matrix:
include:
- python: '3.9'
djvulibre: legacy
- python: '3.10'
djvulibre: legacy
- python: '3.11'
djvulibre: legacy
- python: '3.9'
djvulibre: latest
- python: '3.10'
djvulibre: latest
- python: '3.11'
djvulibre: latest
- python: '3.12'
djvulibre: latest
- python: '3.13'
djvulibre: latest
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
runs-on: ubuntu-latest
name: Python ${{ matrix.python }} with djvulibre ${{ matrix.djvulibre }}
steps:
Expand Down Expand Up @@ -61,28 +45,6 @@ jobs:
- name: install wheel
run:
python -m pip install --upgrade wheel
# Cython 3.0 broke the old code.
- name: install djvulibre legacy
run: |
python -m pip install "cython<3"
mkdir -p deps/
python -m pip download --dest deps --no-binary python-djvulibre --no-deps python-djvulibre
cd deps
mkdir -p python-djvulibre/
tar -xvzf python-djvulibre-* --strip-components=1 -C python-djvulibre
cd python-djvulibre
python setup.py install
if: ${{ matrix.djvulibre == 'legacy' }}
- name: install djuvlibre master
run: |
url="https://github.com/FriedrichFroebel/python-djvulibre/archive/python3.tar.gz"
mkdir -p deps/
wget "$url" -O deps/python-djvulibre.tar.gz
cd deps
tar -xvzf python-djvulibre.tar.gz
cd python-djvulibre-python3/
python -m pip install .
if: ${{ matrix.djvulibre != 'legacy' }}
- name: install package
run:
python -m pip install .[dev,docs]
Expand Down
14 changes: 3 additions & 11 deletions doc/README
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ The following software is required to run ocrodjvu:
+ GOCR_ ≥ 0.40
+ Tesseract_ ≥ 2.00

* DjVuLibre_ ≥ 3.5.21 (≥ 3.5.26 for latest python-djvulibre)
* DjVuLibre_ ≥ 3.5.26

* python-djvulibre_ ≥ 0.4

+ Please note that installing this package currently is a bit more complicated since Cython 3 has been relased on 2023-07-17.
+ While `Issue #11`_ is unresolved, PyPI releases require some workarounds (installing the package from the source archive with the deprecated ``python setup.py install`` beforehand).
+ Alternative: Install the latest package version from `Git <python-djvulibre-git_>`_.
* djvulibre-python_ ≥ 0.9

* lxml_ ≥ 2.0

Expand Down Expand Up @@ -85,11 +81,7 @@ The following software is required to rebuild the manual pages from source:
https://github.com/tesseract-ocr/tesseract
.. _DjVuLibre:
http://djvu.sourceforge.net/
.. _python-djvulibre:
https://jwilk.net/software/python-djvulibre
.. _Issue #11:
https://github.com/FriedrichFroebel/python-djvulibre/issues/11
.. _python-djvulibre-git:
.. _djvulibre-python:
https://github.com/FriedrichFroebel/python-djvulibre
.. _lxml:
https://lxml.de/
Expand Down
7 changes: 7 additions & 0 deletions doc/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
ocrodjvu (0.14) unstable; urgency=low

[ FriedrichFroebel ]
* Replace unmaintained python-djvulibre with djvulibre-python fork.

-- FriedrichFroebel <> Fri, 13 Dec 2024 15:25:00 +0100

ocrodjvu (0.13.2) unstable; urgency=low

[ FriedrichFroebel ]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_version():
include_package_data=True,
python_requires=">=3.6, <4",
install_requires=[
'python-djvulibre>=0.4',
'djvulibre-python>=0.9',
'lxml>=2.0',
],
extras_require={
Expand Down

0 comments on commit 8b3a379

Please sign in to comment.