14
0
2022-05-10 00:07:54 +00:00
committed by Git OBS Bridge
parent 21110a4914
commit 80bbe9de57
4 changed files with 30 additions and 384 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-PyMuPDF
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,11 +17,11 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Python 3 only syntax
# Python 2 build fails always
%define skip_python2 1
%define pypi_name PyMuPDF
Name: python-%{pypi_name}
Version: 1.19.6
Version: 1.18.9
Release: 0
Summary: Python binding for MuPDF, a PDF and XPS viewer
License: AGPL-3.0-only
@@ -29,17 +29,16 @@ 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 distro}
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: jbig2dec-devel
BuildRequires: mupdf-devel-static < 1.20.0
BuildRequires: mupdf-devel-static >= 1.19.0
BuildRequires: mupdf-devel-static < 1.19.0
BuildRequires: mupdf-devel-static >= 1.18.0
BuildRequires: openSUSE-release
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: swig
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gumbo)
BuildRequires: pkgconfig(harfbuzz)
@@ -56,24 +55,24 @@ book formats. PyMuPDF can also access files with extensions *.pdf,
*.xps, *.oxps, *.epub, *.cbz or *.fb2 from Python scripts.
%prep
%setup -q -n %{pypi_name}-%{version}
dos2unix README.md changes.txt
%autosetup -p1 -n %{pypi_name}-%{version}
%build
export CFLAGS="%{optflags} -I/usr/include/freetype2"
%python_build
%install
%python_install
rm %{buildroot}%{_prefix}/{COPYING,README.md,changes.rst}
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# https://github.com/pymupdf/PyMuPDF/issues/1002 requests a better test sequence
cd /tmp
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -c 'import fitz'
%files %{python_files}
%license COPYING
%doc README.md changes.txt
%doc README.md changes.rst
%{python_sitearch}/*
%changelog