summaryrefslogtreecommitdiffstats
path: root/python/python3-PyMuPDF
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-PyMuPDF')
-rw-r--r--python/python3-PyMuPDF/README11
-rw-r--r--python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild24
-rw-r--r--python/python3-PyMuPDF/python3-PyMuPDF.info10
3 files changed, 24 insertions, 21 deletions
diff --git a/python/python3-PyMuPDF/README b/python/python3-PyMuPDF/README
index da799f0765..9a35043dd8 100644
--- a/python/python3-PyMuPDF/README
+++ b/python/python3-PyMuPDF/README
@@ -12,8 +12,13 @@ can also be handled like documents: .png, .jpg, .bmp, .tiff, etc.
krop (available on SBo) can use PyMuPDF for both rendering and cropping.
-To be on the safe side, keep the version of python3-PyMuPDF in sync with
-the mupdf version.
+Mupdf is not a dependency because all of the necessary code is built
+into PyMuPDF.
-Optional autodetected dependencies are python-fonttools, tesseract, and
+Optional runtime dependencies are python3-fonttools, tesseract, and
python3-pymupdf_fonts.
+
+To enable Tesseract OCR functions in PyMuPDF, the software must be
+installed and the system environment variable TESSDATA_PREFIX must
+be defined as follows:
+export TESSDATA_PREFIX=/usr/share/tessdata
diff --git a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
index 1d4a8b7a23..e516f73c57 100644
--- a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
+++ b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-PyMuPDF
-VERSION=${VERSION:-1.23.26}
+VERSION=${VERSION:-1.24.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -52,27 +52,23 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ${PRGNAM:8}-$VERSION
+rm -rf ${PRGNAM:8}-$VERSION mupdf*
+tar xvf $CWD/mupdf-*-source.tar.lz
+mv mupdf* mupdf
tar xvf $CWD/${PRGNAM:8}-$VERSION.tar.gz
cd ${PRGNAM:8}-$VERSION
-chown -R root:root .
-find -L . \
+chown -R root:root . ../mupdf
+find -L . ../mupdf \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-sed -i -e 's/"libclang", "swig", //' pyproject.toml
+sed -i -e "s/ret.append([ ]*'libclang'[ ]*)/pass/" \
+ -e "s/ret.append([ ]*'swig'[ ]*)/pass/" \
+ setup.py
-mv src_classic/fitz_old.i src_classic/fitz.i
-
-sed -i "s/fitz_old/fitz/g" setup.py \
- src_classic/__init__.py src_classic/utils.py
-
-export PYMUPDF_SETUP_MUPDF_BUILD=
-export PYMUPDF_SETUP_IMPLEMENTATIONS=a
-export PYMUPDF_INCLUDES=/usr/include:/usr/include/mupdf:/usr/include/freetype2
-export TESSDATA_PREFIX=/usr/share/tessdata
+export PYMUPDF_SETUP_MUPDF_BUILD=../mupdf
python3 -m build --wheel --no-isolation
python3 -m installer --destdir "$PKG" dist/*.whl
diff --git a/python/python3-PyMuPDF/python3-PyMuPDF.info b/python/python3-PyMuPDF/python3-PyMuPDF.info
index 6fbc4eef4d..17130ff780 100644
--- a/python/python3-PyMuPDF/python3-PyMuPDF.info
+++ b/python/python3-PyMuPDF/python3-PyMuPDF.info
@@ -1,10 +1,12 @@
PRGNAM="python3-PyMuPDF"
-VERSION="1.23.26"
+VERSION="1.24.5"
HOMEPAGE="https://github.com/pymupdf/PyMuPDF"
-DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.23.26/PyMuPDF-1.23.26.tar.gz"
-MD5SUM="3dd25058cbee9f45e823806901b804e8"
+DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.24.5/PyMuPDF-1.24.5.tar.gz \
+ https://mupdf.com/downloads/archive/mupdf-1.24.2-source.tar.lz"
+MD5SUM="17685079ad4d5a534404285a8047e900 \
+ d8f835e414202946d1c6c8192dd4315d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="mupdf python3-psutil %README%"
+REQUIRES="python3-psutil %README%"
MAINTAINER="Alexander Verbovetsky"
EMAIL="alik@ejik.org"