14
0

Accepting request 870215 from home:jayvdb:branches:devel:languages:python

- Remove doc sub-package, fixing builds
- Switch to using PyPI, adding COPYING from upstream
- Update URL
- Add build dependency openSUSE-release, needed by setup.py
- Remove fix-library-linking.patch no longer needed
- Fix %check for single-spec
- Update to v1.18.8

OBS-URL: https://build.opensuse.org/request/show/870215
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyMuPDF?expand=0&rev=28
This commit is contained in:
2021-02-08 15:23:16 +00:00
committed by Git OBS Bridge
parent f6f897107c
commit 661d70ff75
6 changed files with 908 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-PyMuPDF
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,24 +21,27 @@
%define skip_python2 1
%define pypi_name PyMuPDF
Name: python-%{pypi_name}
Version: 1.17.4
Version: 1.18.8
Release: 0
Summary: Python binding for MuPDF, a PDF and XPS viewer
License: GPL-3.0-only AND AGPL-3.0-only
Group: Development/Libraries/Python
URL: https://github.com/rk700/PyMuPDF
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
Patch1: fix-library-linking.patch
URL: https://github.com/pymupdf/PyMuPDF
Source: https://files.pythonhosted.org/packages/source/P/PyMuPDF/PyMuPDF-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/pymupdf/PyMuPDF/master/COPYING
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: jbig2dec-devel
BuildRequires: mupdf-devel-static >= 1.16.0
BuildRequires: mupdf-devel-static >= 1.18.0
BuildRequires: mupdf-devel-static < 1.19.0
BuildRequires: openSUSE-release
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: swig
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gumbo)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libopenjp2)
@@ -52,19 +55,13 @@ 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.
%package doc
Summary: Documentation for PyMuPDF
Group: Development/Libraries/Python
BuildArch: noarch
%description doc
This is the documentation for PyMuPDF.
%prep
%setup -q -n %{pypi_name}-%{version}
%patch1 -p1
cp %{SOURCE1} .
%build
export CFLAGS="%{optflags} -I/usr/include/freetype2"
%python_build
%install
@@ -72,14 +69,11 @@ This is the documentation for PyMuPDF.
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%python_expand PYTHONPATH=%{buildroot}%{python_sitearch} $python -c 'import sys; sys.path.remove(""); import fitz'
cd /tmp
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -c 'import fitz'
%files %{python_files}
%license COPYING
%doc README.md
%{python_sitearch}/*
%files doc
%doc docs/*
%changelog