## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname pikepdf # disable docs on EPEL 9 to avoid circular dependency on matplotlib %if %{defined el9} %bcond_with docs %else %bcond_without docs %endif Name: python-%{srcname} Version: 2.16.1 Release: %autorelease Summary: Read and write PDFs with Python, powered by qpdf License: MPL-2.0 URL: https://github.com/pikepdf/pikepdf Source0: %pypi_source # https://github.com/pikepdf/pikepdf/commit/caaf1119784b32f8b68d26b2c05a8fc2bea5ad89 Patch1: 0001-Replace-pkg_resources-with-importlib.metadata.patch # https://github.com/pikepdf/pikepdf/commit/4f6923fe33c2d7e78d1482a5eb2beb6e9155977b Patch2: 0002-Fix-palette-handling-for-Pillow-9.1.0.patch # downstream only Patch3: 0003-Adjust-test-requirements.patch BuildRequires: gcc-c++ BuildRequires: qpdf-devel >= 10.0.3 BuildRequires: python3-devel # Tests: BuildRequires: poppler-utils %global _description %{expand: pikepdf is a Python library for reading and writing PDF files. pikepdf is based on QPDF, a powerful PDF manipulation and repair library.} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %if %{with docs} %package -n python-%{srcname}-doc Summary: pikepdf documentation # Not autorequired because it's a Fedora-specific subpackage. BuildRequires: python3-ipython-sphinx %description -n python-%{srcname}-doc Documentation for pikepdf %endif %prep %autosetup -n %{srcname}-%{version} -p1 %if %{with docs} # We don't build docs against the installed version, so force the version. sed -i -e "s/release = .\+/release = '%{version}'/g" docs/conf.py %endif %generate_buildrequires %pyproject_buildrequires -x test %{?with_docs:-x doc} %build %pyproject_wheel %if %{with docs} # generate html docs export PYTHONPATH="%{pyproject_build_lib}" pushd docs sphinx-build-3 . ../html popd # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files %{srcname} %check %pytest -x %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %if %{with docs} %files -n python-%{srcname}-doc %doc html %license LICENSE.txt %endif %changelog * Sat Apr 15 2023 Carl George - 2.16.1-2 - Uncommitted changes * Sat Jul 31 2021 Elliott Sales de Andrade - 2.16.1-1 - Update to latest version (#1986379) * Mon Jul 26 2021 Elliott Sales de Andrade - 2.15.1-1 - Update to latest version (#1983955) * Fri Jul 23 2021 Fedora Release Engineering - 2.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jul 16 2021 Elliott Sales de Andrade - 2.15.0-1 - Update to latest version (#1981984) * Sun Jul 11 2021 Elliott Sales de Andrade - 2.14.2-1 - Update to latest version (#1979400) * Mon Jun 28 2021 Elliott Sales de Andrade - 2.13.0-1 - Update to latest version (#1974617) * Sat Jun 19 2021 Elliott Sales de Andrade - 2.12.2-1 - Update to latest version (#1968156) * Fri Jun 04 2021 Python Maint - 2.12.1-2 - Rebuilt for Python 3.10 * Sat May 22 2021 Elliott Sales de Andrade - 2.12.1-1 - Update to latest version (#1963060) * Sun May 09 2021 Elliott Sales de Andrade - 2.12.0-1 - Update to latest version (#1958620) * Thu Apr 29 2021 Elliott Sales de Andrade - 2.11.4-1 - Update to latest version (#1953935) * Tue Apr 27 2021 Elliott Sales de Andrade - 2.11.3-1 - Update to latest version (#1953935) * Fri Apr 23 2021 Elliott Sales de Andrade - 2.11.2-1 - Update to latest version (#1952724) * Thu Apr 15 2021 Elliott Sales de Andrade - 2.11.1-1 - Update to latest version (#1948784) * Fri Apr 09 2021 Elliott Sales de Andrade - 2.11.0-1 - Update to latest version (#1946953) * Wed Mar 31 2021 Elliott Sales de Andrade - 2.10.0-1 - Update to latest version (#1942854) * Thu Mar 25 2021 Elliott Sales de Andrade - 2.9.2-1 - Update to latest version (#1942854) * Sat Mar 20 2021 Elliott Sales de Andrade - 2.9.1-1 - Update to latest version (#1941127) * Fri Mar 19 2021 Elliott Sales de Andrade - 2.9.0-1 - Update to latest version (#1938957) * Sun Feb 28 2021 Elliott Sales de Andrade - 2.8.0-1 - Update to latest version (#1933531) * Sat Feb 27 2021 Elliott Sales de Andrade - 2.7.0-1 - Update to latest version (#1933453) * Sat Feb 27 2021 Elliott Sales de Andrade - 2.6.0-1 - Update to latest version (#1933209) * Sat Feb 06 2021 Elliott Sales de Andrade - 2.5.2-1 - Update to latest version - Fixes rhbz#1920753 - Fixes rhbz#1923549 * Wed Jan 27 2021 Fedora Release Engineering - 2.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Jan 16 2021 Elliott Sales de Andrade - 2.4.0-1 - Update to latest version (#1916969) * Fri Jan 08 2021 Elliott Sales de Andrade - 2.3.0-1 - Update to latest version (#1912665) * Tue Dec 29 2020 Elliott Sales de Andrade - 2.2.4-1 - Update to latest version (#1911403) * Tue Dec 29 2020 Elliott Sales de Andrade - 2.2.3-1 - Update to latest version (#1911403) * Wed Dec 23 2020 Elliott Sales de Andrade - 2.2.2-1 - Update to latest version (#1910311) * Wed Dec 23 2020 Elliott Sales de Andrade - 2.2.1-1 - Update to latest version (#1891776) * Wed Dec 23 2020 Elliott Sales de Andrade - 1.19.4-1 - Update to latest version * Wed Sep 09 2020 Elliott Sales de Andrade - 1.19.3-1 - Update to latest version (#1877068) * Mon Sep 07 2020 Elliott Sales de Andrade - 1.19.1-1 - Update to latest version (#1876202) * Wed Aug 19 2020 Elliott Sales de Andrade - 1.19.0-1 - Update to latest version (#1869556) - Allow latest pytest and pytest-xdist * Tue Aug 11 2020 Elliott Sales de Andrade - 1.18.0-1 - Update to latest version (rhbz#1867536) * Sun Jul 26 2020 Elliott Sales de Andrade - 1.17.3-1 - Update to latest version * Fri Jul 17 2020 Elliott Sales de Andrade - 1.17.2-1 - Update to latest version * Tue Jul 14 2020 Elliott Sales de Andrade - 1.17.1-1 - Update to latest version * Mon Jul 13 2020 Elliott Sales de Andrade - 1.17.0-1 - Update to latest version * Thu Jul 02 2020 Elliott Sales de Andrade - 1.16.1-1 - Update to latest version * Sat Jun 20 2020 Elliott Sales de Andrade - 1.15.1-1 - Update to latest version * Sun May 31 2020 Elliott Sales de Andrade - 1.14.0-1 - Update to latest version * Tue May 26 2020 Miro Hrončok - 1.13.0-2 - Rebuilt for Python 3.9 * Sun May 17 2020 Elliott Sales de Andrade - 1.13.0-1 - Update to latest version * Fri May 15 2020 Elliott Sales de Andrade - 1.12.0-1 - Update to latest version * Mon May 04 2020 Elliott Sales de Andrade - 1.11.2-1 - Update to latest version * Fri Apr 17 2020 Elliott Sales de Andrade - 1.11.1-1 - Update to latest version * Tue Apr 14 2020 Zdenek Dohnal - 1.11.0-2 - rebuilt for qpdf-10.0.1 * Mon Apr 13 2020 Elliott Sales de Andrade - 1.11.0-1 - Update to latest version * Thu Apr 02 2020 Elliott Sales de Andrade - 1.10.4-1 - Update to latest version * Tue Mar 17 2020 Elliott Sales de Andrade - 1.10.3-1 - Update to latest version * Mon Feb 24 2020 Elliott Sales de Andrade - 1.10.2-1 - Update to latest version * Fri Feb 14 2020 Elliott Sales de Andrade - 1.10.1-1 - Update to latest version * Tue Jan 28 2020 Elliott Sales de Andrade - 1.10.0-1 - Update to latest version * Mon Jan 06 2020 Elliott Sales de Andrade - 1.8.3-1 - Update to latest version * Thu Jan 02 2020 Elliott Sales de Andrade - 1.8.2-1 - Update to latest version * Thu Jan 02 2020 Elliott Sales de Andrade - 1.8.1-1 - Update to latest version * Tue Nov 19 2019 Zdenek Dohnal - 1.7.0-2 - rebuilt for qpdf-9.1.0 * Mon Nov 11 2019 Elliott Sales de Andrade - 1.7.0-1 - Update to latest version * Mon Oct 21 2019 Elliott Sales de Andrade - 1.6.5-1 - Update to latest version * Sun Sep 22 2019 Elliott Sales de Andrade - 1.6.4-1 - Update to latest version * Wed Sep 04 2019 Elliott Sales de Andrade - 1.6.3-1 - Update to latest version * Fri Aug 30 2019 Elliott Sales de Andrade - 1.6.2-1 - Update to latest version * Fri Aug 23 2019 Elliott Sales de Andrade - 1.6.1-1 - Update to latest version * Mon Aug 19 2019 Miro Hrončok - 1.5.0-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 1.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jul 22 2019 Elliott Sales de Andrade - 1.5.0-1 - Update to latest version * Tue May 14 2019 Elliott Sales de Andrade - 1.3.0-1 - Update to latest version * Tue Apr 16 2019 Elliott Sales de Andrade - 1.2.0-1 - Update to latest version * Sun Mar 03 2019 Elliott Sales de Andrade - 1.1.0-1 - Update to latest version * Tue Feb 12 2019 Elliott Sales de Andrade - 1.0.5-1 - Update to latest version * Sat Feb 02 2019 Fedora Release Engineering - 1.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Jan 13 2019 Elliott Sales de Andrade - 1.0.4-1 - Update to latest version * Sat Jan 05 2019 Elliott Sales de Andrade - 1.0.1-1 - Update to latest version * Wed Dec 12 2018 Elliott Sales de Andrade - 0.3.7-1 - Update to latest version * Sat Oct 13 2018 Elliott Sales de Andrade - 0.3.5-1 - Update to latest version * Tue Sep 25 2018 Elliott Sales de Andrade - 0.3.3-2 - Force requires to new qpdf * Mon Sep 24 2018 Elliott Sales de Andrade - 0.3.3-1 - Update to latest version * Tue Aug 21 2018 Elliott Sales de Andrade - 0.3.2-1 - Initial package.