aboutsummaryrefslogtreecommitdiff
path: root/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-03-19 01:01:27 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-03-23 08:17:12 +0700
commitcf40b9bc7bb6d962bb4b537a42901a84131c8ec3 (patch)
tree15e39b0115ba5cfa3e6e1072244047dc249afa07 /python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
parent3e423bcb00704540e5c122c7f692919e3311c496 (diff)
python/python3-PyMuPDF: Updated for version 1.23.26.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild')
-rw-r--r--python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild21
1 files changed, 16 insertions, 5 deletions
diff --git a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
index 9c5d0f4630..1d4a8b7a23 100644
--- a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
+++ b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for python3-PyMuPDF
-# Copyright 2023, Alexander Verbovetsky, Moscow, Russia
+# Copyright 2023-2024, Alexander Verbovetsky, Moscow, Russia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-PyMuPDF
-VERSION=${VERSION:-1.21.1}
+VERSION=${VERSION:-1.23.26}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -62,14 +62,25 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-export PYMUPDF_SETUP_MUPDF_BUILD=""
-python3 setup.py install --root=$PKG
+sed -i -e 's/"libclang", "swig", //' pyproject.toml
+
+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
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$PKG" dist/*.whl
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README.md changes.txt docs $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README* changes.txt docs $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install