2019-04-11 07:52:10 +00:00
|
|
|
#
|
2025-03-17 20:13:55 +00:00
|
|
|
# spec file for package python-PyMuPDF
|
2019-04-11 07:52:10 +00:00
|
|
|
#
|
2025-03-17 20:13:55 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2019-04-11 07:52:10 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-05-10 00:07:54 +00:00
|
|
|
# Python 2 build fails always
|
2019-07-18 08:07:22 +00:00
|
|
|
%define skip_python2 1
|
2019-04-11 07:52:10 +00:00
|
|
|
%define pypi_name PyMuPDF
|
2023-12-14 08:09:07 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-04-11 07:52:10 +00:00
|
|
|
Name: python-%{pypi_name}
|
2023-01-06 10:08:58 +00:00
|
|
|
Version: 1.21.1
|
2019-04-11 07:52:10 +00:00
|
|
|
Release: 0
|
2019-06-03 08:05:03 +00:00
|
|
|
Summary: Python binding for MuPDF, a PDF and XPS viewer
|
2021-02-27 17:37:25 +00:00
|
|
|
License: AGPL-3.0-only
|
2019-09-18 05:35:00 +00:00
|
|
|
Group: Development/Libraries/Python
|
2021-02-08 15:23:16 +00:00
|
|
|
URL: https://github.com/pymupdf/PyMuPDF
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/P/PyMuPDF/PyMuPDF-%{version}.tar.gz
|
2019-04-11 07:52:10 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2022-05-10 00:18:34 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-04-11 08:01:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2022-05-10 00:18:34 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-04-11 07:52:10 +00:00
|
|
|
BuildRequires: fdupes
|
2022-05-10 00:07:54 +00:00
|
|
|
BuildRequires: gcc
|
2022-05-10 00:15:55 +00:00
|
|
|
BuildRequires: gcc-c++
|
2019-04-11 07:52:57 +00:00
|
|
|
BuildRequires: jbig2dec-devel
|
2021-02-08 15:23:16 +00:00
|
|
|
BuildRequires: openSUSE-release
|
2019-04-11 08:01:50 +00:00
|
|
|
BuildRequires: pkgconfig
|
2019-04-11 07:52:57 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-05-10 00:07:54 +00:00
|
|
|
BuildRequires: swig
|
2019-04-11 08:01:50 +00:00
|
|
|
BuildRequires: pkgconfig(freetype2)
|
|
|
|
BuildRequires: pkgconfig(harfbuzz)
|
|
|
|
BuildRequires: pkgconfig(libjpeg)
|
|
|
|
BuildRequires: pkgconfig(libopenjp2)
|
2019-07-18 08:07:22 +00:00
|
|
|
BuildRequires: pkgconfig(libpng16)
|
2019-04-11 08:01:50 +00:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2023-03-07 19:03:02 +00:00
|
|
|
Provides: bundled(mupdf) = %version
|
|
|
|
# mupdf has bundled() on its own, too, so kinda bad
|
2019-04-11 07:52:10 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-06-03 08:05:03 +00:00
|
|
|
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.
|
2019-04-11 07:52:10 +00:00
|
|
|
|
|
|
|
%prep
|
2022-05-10 00:07:54 +00:00
|
|
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
2019-04-11 07:52:10 +00:00
|
|
|
|
|
|
|
%build
|
2025-03-17 20:13:55 +00:00
|
|
|
export CFLAGS="%{optflags} -I/usr/include/freetype2 -DNDEBUG"
|
|
|
|
export ARCHFLAGS="%{optflags}"
|
2022-05-10 00:18:34 +00:00
|
|
|
%pyproject_wheel
|
2019-04-11 07:52:10 +00:00
|
|
|
|
|
|
|
%install
|
2022-05-10 00:18:34 +00:00
|
|
|
%pyproject_install
|
2019-04-11 07:52:10 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
2019-07-30 14:14:27 +00:00
|
|
|
%check
|
2021-02-08 15:23:16 +00:00
|
|
|
cd /tmp
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -c 'import fitz'
|
2019-07-30 14:14:27 +00:00
|
|
|
|
2019-04-11 07:52:10 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license COPYING
|
2022-05-10 00:24:03 +00:00
|
|
|
%doc README.md
|
2025-07-03 12:19:27 +00:00
|
|
|
%{python_sitearch}/[Pp]y[Mm]u[Pp][Dd][Ff]-%{version}*info
|
2022-09-12 09:31:35 +00:00
|
|
|
%{python_sitearch}/fitz/
|
2019-04-11 07:52:10 +00:00
|
|
|
|
|
|
|
%changelog
|