From 5be0048c0a8d1fc9c19b8cc0bd1f9a8cbb2bb273 Mon Sep 17 00:00:00 2001 From: Bastian Germann Date: Sun, 23 Aug 2020 20:15:38 +0100 Subject: [PATCH] Import pymupdf_1.17.4+ds1-2.debian.tar.xz [dgit import tarball pymupdf 1.17.4+ds1-2 pymupdf_1.17.4+ds1-2.debian.tar.xz] --- changelog | 61 ++++++++++++++++++++++++++++++++++ clean | 2 ++ control | 26 +++++++++++++++ copyright | 40 ++++++++++++++++++++++ patches/docs | 21 ++++++++++++ patches/fiximport | 17 ++++++++++ patches/libs | 13 ++++++++ patches/non-linux | 21 ++++++++++++ patches/series | 4 +++ python3-fitz.lintian-overrides | 5 +++ rules | 11 ++++++ salsa-ci.yml | 3 ++ source/format | 1 + tests/control | 4 +++ watch | 4 +++ 15 files changed, 233 insertions(+) create mode 100644 changelog create mode 100644 clean create mode 100644 control create mode 100644 copyright create mode 100644 patches/docs create mode 100644 patches/fiximport create mode 100644 patches/libs create mode 100644 patches/non-linux create mode 100644 patches/series create mode 100644 python3-fitz.lintian-overrides create mode 100755 rules create mode 100644 salsa-ci.yml create mode 100644 source/format create mode 100644 tests/control create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..a1dba00 --- /dev/null +++ b/changelog @@ -0,0 +1,61 @@ +pymupdf (1.17.4+ds1-2) unstable; urgency=medium + + * Team upload + + [ Nicholas D Steeves ] + * Mention PyMuPDF in long description so that a user who 'apt search + pymupdf' will discover this package. + + [ Bastian Germann ] + * Fix imports and shared libs for non-Linux platforms + * Clean generated files + + [ Sergio Durigan Junior ] + * d/control: Bump debhelper-compat to 13. + * d/control: Remove duplicate field "Priority" from python3-fitz. + + -- Bastian Germann Sun, 23 Aug 2020 21:15:38 +0200 + +pymupdf (1.17.4+ds1-1) unstable; urgency=medium + + * Team upload + * Use debhelper provided python3:Provides + * Set Built-Using according to Policy 7.8 (Closes: #959958) + * Update upstream copyright info + * New upstream version 1.17.4+ds1 + * Refresh docs patch + * Let dependency fit the new mupdf version + * Add build dependency libmujs-dev + * Add mujs to libs patch + + -- Bastian Germann Fri, 07 Aug 2020 13:03:11 +0200 + +pymupdf (1.16.11-1) unstable; urgency=medium + + [ Johannes 'josch' Schauer ] + * New upstream version 1.16.11 (closes: #950639) + * Bump Standards-Version to 4.5.0 + * add debian/salsa-ci.yml + * debian/control: b-d on libpython3-all-dev instead of libpython3-dev + * debian/copyright: remove unused files from Files-Excluded + * add autopkgtest + * add patch fiximport + * debian/control: add Rules-Requires-Root: no + * debian/tests/control: chdir to / to not use fitz module from unpacked + sources + * add debian/python3-fitz.lintian-overrides + * debian/watch: add repacksuffix + * debian/watch: don't run uupdate + + [ Bastian Germann ] + * Drop non-existing examples + * Exclude 1.16.11 files + * Add docs patch + + -- Johannes 'josch' Schauer Sun, 23 Feb 2020 21:05:36 +0100 + +pymupdf (1.14.16-1) unstable; urgency=medium + + * Initial release. (Closes: #930761) + + -- Johannes 'josch' Schauer Sat, 22 Jun 2019 04:02:32 +0200 diff --git a/clean b/clean new file mode 100644 index 0000000..c13eed2 --- /dev/null +++ b/clean @@ -0,0 +1,2 @@ +fitz/fitz.py +fitz/fitz_wrap.c diff --git a/control b/control new file mode 100644 index 0000000..365bdee --- /dev/null +++ b/control @@ -0,0 +1,26 @@ +Source: pymupdf +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Johannes 'josch' Schauer +Homepage: https://github.com/pymupdf/PyMuPDF +Vcs-Browser: https://salsa.debian.org/python-team/modules/pymupdf +Vcs-Git: https://salsa.debian.org/python-team/modules/pymupdf.git +Standards-Version: 4.5.0 +Build-Depends: debhelper-compat (= 13), dh-python, python3-setuptools, python3-all, libpython3-all-dev, libmupdf-dev (>= 1.17.0), libmujs-dev, libjbig2dec-dev, libjpeg-dev, libfreetype6-dev, libpng-dev, libopenjp2-7-dev, libharfbuzz-dev, swig +Rules-Requires-Root: no + +Package: python3-fitz +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends} +Provides: ${python3:Provides} +Built-Using: ${Built-Using} +Description: Python binding for MuPDF + Allows one to access files in PDF, XPS, OpenXPS, CBZ, EPUB, and FB2 (e-books) + formats, and it is known for its top performance and high rendering quality. + . + PDF manipulation and generation functions are available, including metadata + and bookmark maintenance, document restructuring, annotation / link handling + and document or page creation. + . + This package contains PyMuPDF. diff --git a/copyright b/copyright new file mode 100644 index 0000000..6f7955b --- /dev/null +++ b/copyright @@ -0,0 +1,40 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: PyMuPDF +Upstream-Contact: Jorj X. McKie +Source: https://github.com/pymupdf/PyMuPDF/ +Files-Excluded: docs/_static + fitz/_config.h + +# upstream's clarification that indeed all material is GPL-3+ can be +# found in this comment and the ones that follow: +# https://github.com/pymupdf/PyMuPDF/issues/312#issuecomment-504641426 +Files: * +Copyright: 2012-2018 Ruikai Liu + 2015-2020 Jorj X. McKie +License: GPL-3+ + +Files: debian/* +Copyright: 2019 Johannes 'josch' Schauer +License: GPL-3+ + +License: GPL-3+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. diff --git a/patches/docs b/patches/docs new file mode 100644 index 0000000..bcae917 --- /dev/null +++ b/patches/docs @@ -0,0 +1,21 @@ +Description: [PATCH] Prevent docs build warnings + +diff --git a/docs/conf.py b/docs/conf.py +index 1175edf..e726f8d 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -128,12 +128,12 @@ html_theme_options = { + # The name of an image file (within the static path) to use as favicon of the + # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 + # pixels large. +-html_favicon = "Pymupdf.ico" ++html_favicon = "PyMuPDF.ico" + + # Add any paths that contain custom static files (such as style sheets) here, + # relative to this directory. They are copied after the builtin static files, + # so a file named "default.css" will overwrite the builtin "default.css". +-html_static_path = ["_static"] ++html_static_path = [] + + # Add any extra paths that contain custom files (such as robots.txt or + # .htaccess) here, relative to this directory. These files are copied diff --git a/patches/fiximport b/patches/fiximport new file mode 100644 index 0000000..f0b6398 --- /dev/null +++ b/patches/fiximport @@ -0,0 +1,17 @@ +Author: Johannes 'josch' Schauer +Description: add additional import statement as otherwise you'd get: + Traceback (most recent call last): + File "", line 1, in + File "[...]/src/fitz/__init__.py", line 3, in + from fitz.fitz import * + ModuleNotFoundError: No module named 'fitz.fitz' + +--- a/fitz/__init__.py ++++ b/fitz/__init__.py +@@ -1,5 +1,6 @@ + from __future__ import absolute_import, print_function + import sys ++import fitz.fitz as fitz + from fitz.fitz import * + + # define the supported colorspaces for convenience diff --git a/patches/libs b/patches/libs new file mode 100644 index 0000000..ad847db --- /dev/null +++ b/patches/libs @@ -0,0 +1,13 @@ +Description: Link shared library with additional libs + +--- a/setup.py ++++ b/setup.py +@@ -25,7 +25,7 @@ if sys.platform.startswith("linux"): + "mupdf", + #'crypto', #openssl is required by mupdf on archlinux + #'jbig2dec', 'openjp2', 'jpeg', 'freetype', +- "mupdf-third", ++ "mujs", "harfbuzz", "jbig2dec", "jpeg", "freetype", "png16", "openjp2" + ], # the libraries to link with + ) + elif sys.platform.startswith(("darwin", "freebsd")): diff --git a/patches/non-linux b/patches/non-linux new file mode 100644 index 0000000..96c62bd --- /dev/null +++ b/patches/non-linux @@ -0,0 +1,21 @@ +Description: Fix imports and shared libs for non-Linux platforms + +--- a/setup.py ++++ b/setup.py +@@ -53,13 +53,13 @@ else: + "fitz._fitz", + ["fitz/fitz.i"], + include_dirs=[ # we need the path of the MuPDF's headers ++ "/usr/include/mupdf", + "./mupdf/include", + "./mupdf/include/mupdf", + ], + libraries=[ # these are needed in Windows +- "libmupdf", +- "libresources", +- "libthirdparty", ++ "mupdf", ++ "mujs", "harfbuzz", "jbig2dec", "jpeg", "freetype", "png16", "openjp2", + ], + extra_link_args=["/NODEFAULTLIB:MSVCRT"], + # x86 dir of libmupdf.lib etc. diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..634a122 --- /dev/null +++ b/patches/series @@ -0,0 +1,4 @@ +docs +libs +fiximport +non-linux diff --git a/python3-fitz.lintian-overrides b/python3-fitz.lintian-overrides new file mode 100644 index 0000000..6d8bb89 --- /dev/null +++ b/python3-fitz.lintian-overrides @@ -0,0 +1,5 @@ +# all false positives +python3-fitz: spelling-error-in-binary usr/lib/python3/dist-packages/fitz/_fitz.cpython-*.so SyLES Styles +python3-fitz: spelling-error-in-binary usr/lib/python3/dist-packages/fitz/_fitz.cpython-*.so Yau You +python3-fitz: spelling-error-in-binary usr/lib/python3/dist-packages/fitz/_fitz.cpython-*.so moR more +python3-fitz: spelling-error-in-binary usr/lib/python3/dist-packages/fitz/_fitz.cpython-*.so pres press diff --git a/rules b/rules new file mode 100755 index 0000000..2f8d25f --- /dev/null +++ b/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +override_dh_gencontrol: + dh_gencontrol -- -VBuilt-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W libmupdf-dev)" + +%: + dh $@ --buildsystem=pybuild --with python3 diff --git a/salsa-ci.yml b/salsa-ci.yml new file mode 100644 index 0000000..892f3cd --- /dev/null +++ b/salsa-ci.yml @@ -0,0 +1,3 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..6882132 --- /dev/null +++ b/tests/control @@ -0,0 +1,4 @@ +Test-Command: env --chdir=/ python3 -c "import fitz" +Restrictions: allow-stderr +Depends: python3-fitz +Features: test-name=python3-fitz diff --git a/watch b/watch new file mode 100644 index 0000000..9feeac5 --- /dev/null +++ b/watch @@ -0,0 +1,4 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%PyMuPDF-$1.tar.gz%,dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1" \ + https://github.com/pymupdf/PyMuPDF/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz -- 2.30.2