14
0
Files
python-PyMuPDF/python-PyMuPDF.spec

80 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
Accepting request 1039381 from home:yarunachalam:branches:devel:languages:python - Update to version 1.21.0 * This release uses MuPDF-1.21.0. New feature: Stories. Added wheels for Python-3.11. * Bug fixes: Fixed #1701: Broken custom image insertion. Fixed #1854: Document.delete_pages() declines keyword arguments. Fixed #1868: Access Violation Error at page.apply_redactions(). Fixed #1909: Adding text with fontname=”Helvetica” can silently fail. Fixed #1913: draw_rect(): does not respect width if color is not specified. Fixed #1917: subset_fonts(): make it possible to silence the stdout. Fixed #1936: Rectangle detection can be incorrect producing wrong output. Fixed #1945: Segmentation fault when saving with clean=True. Fixed #1965: pdfocr_save() Hard Crash. Fixed #1971: Segmentation fault when using get_drawings(). Fixed #1946: block_no and block_type switched in get_text() docs. Fixed #2013: AttributeError: ‘Widget’ object has no attribute ‘_annot’ in delete widget. * Misc changes to core code: Fixed various compiler warnings and a sequence-point bug. Added support for Memento builds. Fixed leaks detected by Memento in test suite. Fixed handling of exceptions in set_name() and set_rect(). Allow build with latest MuPDF, for regular testing of PyMuPDF master. Cope with new MuPDF exceptions when setting rect for some Annot types. Reduced cosmetic differences between MuPDF’s config.h and PyMuPDF’s _config.h. Cope with various changes to MuPDF API. * Other: Fixed various broken links and typos in docs. Mention install of swig-python on MacOS for #875. OBS-URL: https://build.opensuse.org/request/show/1039381 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyMuPDF?expand=0&rev=51
2022-12-02 10:45:59 +00:00
# spec file
#
Accepting request 1056252 from home:yarunachalam:branches:devel:languages:python - Update to version 1.21.1: Bug fixes: * Fixed #2110: Fully embedded font is extracted only partially if it occupies more than one object * Fixed #2094: Rectangle Detection Logic * Fixed #2088: Destination point not set for named links in toc * Fixed #2087: Image with Filter “[/FlateDecode/JPXDecode]” not extracted * Fixed #2086: Document.save() owner_pw & user_pw has buffer overflow bug * Fixed #2076: Segfault in fitz.py * Fixed #2057: Document.save garbage parameter not working in PyMuPDF 1.21.0 * Fixed #2051: Missing DPI Parameter * Fixed #2048: Invalid size of TextPage and bbox with newest version 1.21.0 * Fixed #2045: SystemError: <built-in function Page_get_texttrace> returned a result with an error set * Fixed #2039: 1.21.0 fails to build against system libmupdf * Fixed #2036: Archive::Archive defined twice Other * Swallow “&zoom=nan” in link uri strings. * Add new Page utility methods Page.replace_image() and Page.delete_image(). Documentation: #2040: Added note about test failure with non-default build of MuPDF, to tests/README.md. #2037: In docs/installation.rst, mention incompatibility with chocolatey.org on Windows. #2061: Fixed description of Annot.file_info. #2065: Show how to insert internal PDF link. Improved description of building from source without an sdist. Added information about running tests. #2084: Fixed broken link to PyMuPDF-Utilities. OBS-URL: https://build.opensuse.org/request/show/1056252 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyMuPDF?expand=0&rev=53
2023-01-06 10:08:58 +00:00
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Python 2 build fails always
%define skip_python2 1
%define pypi_name PyMuPDF
Name: python-%{pypi_name}
Accepting request 1056252 from home:yarunachalam:branches:devel:languages:python - Update to version 1.21.1: Bug fixes: * Fixed #2110: Fully embedded font is extracted only partially if it occupies more than one object * Fixed #2094: Rectangle Detection Logic * Fixed #2088: Destination point not set for named links in toc * Fixed #2087: Image with Filter “[/FlateDecode/JPXDecode]” not extracted * Fixed #2086: Document.save() owner_pw & user_pw has buffer overflow bug * Fixed #2076: Segfault in fitz.py * Fixed #2057: Document.save garbage parameter not working in PyMuPDF 1.21.0 * Fixed #2051: Missing DPI Parameter * Fixed #2048: Invalid size of TextPage and bbox with newest version 1.21.0 * Fixed #2045: SystemError: <built-in function Page_get_texttrace> returned a result with an error set * Fixed #2039: 1.21.0 fails to build against system libmupdf * Fixed #2036: Archive::Archive defined twice Other * Swallow “&zoom=nan” in link uri strings. * Add new Page utility methods Page.replace_image() and Page.delete_image(). Documentation: #2040: Added note about test failure with non-default build of MuPDF, to tests/README.md. #2037: In docs/installation.rst, mention incompatibility with chocolatey.org on Windows. #2061: Fixed description of Annot.file_info. #2065: Show how to insert internal PDF link. Improved description of building from source without an sdist. Added information about running tests. #2084: Fixed broken link to PyMuPDF-Utilities. OBS-URL: https://build.opensuse.org/request/show/1056252 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyMuPDF?expand=0&rev=53
2023-01-06 10:08:58 +00:00
Version: 1.21.1
Release: 0
Summary: Python binding for MuPDF, a PDF and XPS viewer
License: AGPL-3.0-only
Group: Development/Libraries/Python
URL: https://github.com/pymupdf/PyMuPDF
Source: https://files.pythonhosted.org/packages/source/P/PyMuPDF/PyMuPDF-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: jbig2dec-devel
BuildRequires: mupdf-devel-static >= 1.20.3
BuildRequires: openSUSE-release
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: swig
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libopenjp2)
BuildRequires: pkgconfig(libpng16)
BuildRequires: pkgconfig(zlib)
%python_subpackages
%description
This is PyMuPDF, a Python binding for MuPDF, a PDF and XPS viewer.
MuPDF can access files in PDF, XPS, OpenXPS, epub, comic and fiction
book formats. PyMuPDF can also access files with extensions *.pdf,
*.xps, *.oxps, *.epub, *.cbz or *.fb2 from Python scripts.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
export CFLAGS="%{optflags} -I/usr/include/freetype2"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
cd /tmp
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -c 'import fitz'
%files %{python_files}
%license COPYING
%doc README.md
%{python_sitearch}/PyMuPDF-%{version}*-info
%{python_sitearch}/fitz/
%changelog