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

87 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pikepdf
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2020-2021, Martin Hauke <mardnh@gmx.de>
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-pikepdf
Version: 8.2.1
Release: 0
Summary: Read and write PDFs with Python, powered by qpdf
License: MPL-2.0
Group: Development/Libraries/Python
URL: https://github.com/pikepdf/pikepdf
Source: https://files.pythonhosted.org/packages/source/p/pikepdf/pikepdf-%{version}.tar.gz
## SECTION test requirements
- update to 5.1.0: * Rebuild against QPDF 10.6.3. * Improvements to Makefile for Apple Silicon wheels. * Fix issue where Pdf.check() would report a failure if JBIG2 decoder was not installed and the PDF contains JBIG2 content. * Some errors and inconsistencies are in the "pdfdoc" encoding provided by pikepdf have been corrected, in conjunction with fixes in libqpdf. * libqpdf 10.6.2 is required. * Previously, looking up the number of a page, given the page, required a linear search of all pages. We now use a newer QPDF API that allows quicker lookups. * Fixed gcc linker error with linking to a source-compiled version of qpdf. Thanks @jerkenbilt. * Fixed dead/obsolete link to old QPDF manual. Thanks @m-holger. * Rebuild binary wheels against qpdf 10.5.0. Note 10.6.0 has been released but requires further changes so does not work yet. * Removed some workarounds to support now-unsupported versions of pybind11. * Adjusted hypothesis test settings so it does not randomly fail on PyPy. * Mention vector vs raster images in documentation. * JBIG2 decoding is now more tightly integrated. In particular, we can now decode more types of JBIG2 image and they can be decoded using either the object or image interface. * Switch to tomli for TOML parsing. * Refactor image tests to use hypothesis more effectively and use more random issues, fixing many errors along the way. * Fixed two instances of a Python object being copied without the GIL held. May have caused some instability. Thanks @rwgk. * Further improvements to handling of 2- and 4-bit per component images. Major refactoring of relevant code and improved testing. * Mark pybind11 2.9 as supported. Thanks @QuLogic. * Improved support for images with bits per component set to values between 2 and 7 inclusive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=24
2022-03-27 18:26:34 +00:00
BuildRequires: %{python_module Pillow >= 9.0.0}
BuildRequires: %{python_module attrs >= 20.2.0}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module hypothesis >= 6.36}
BuildRequires: %{python_module ipython}
BuildRequires: %{python_module lxml >= 4.0}
- update to 5.1.0: * Rebuild against QPDF 10.6.3. * Improvements to Makefile for Apple Silicon wheels. * Fix issue where Pdf.check() would report a failure if JBIG2 decoder was not installed and the PDF contains JBIG2 content. * Some errors and inconsistencies are in the "pdfdoc" encoding provided by pikepdf have been corrected, in conjunction with fixes in libqpdf. * libqpdf 10.6.2 is required. * Previously, looking up the number of a page, given the page, required a linear search of all pages. We now use a newer QPDF API that allows quicker lookups. * Fixed gcc linker error with linking to a source-compiled version of qpdf. Thanks @jerkenbilt. * Fixed dead/obsolete link to old QPDF manual. Thanks @m-holger. * Rebuild binary wheels against qpdf 10.5.0. Note 10.6.0 has been released but requires further changes so does not work yet. * Removed some workarounds to support now-unsupported versions of pybind11. * Adjusted hypothesis test settings so it does not randomly fail on PyPy. * Mention vector vs raster images in documentation. * JBIG2 decoding is now more tightly integrated. In particular, we can now decode more types of JBIG2 image and they can be decoded using either the object or image interface. * Switch to tomli for TOML parsing. * Refactor image tests to use hypothesis more effectively and use more random issues, fixing many errors along the way. * Fixed two instances of a Python object being copied without the GIL held. May have caused some instability. Thanks @rwgk. * Further improvements to handling of 2- and 4-bit per component images. Major refactoring of relevant code and improved testing. * Mark pybind11 2.9 as supported. Thanks @QuLogic. * Improved support for images with bits per component set to values between 2 and 7 inclusive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=24
2022-03-27 18:26:34 +00:00
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module psutil >= 5.9}
BuildRequires: %{python_module pybind11 >= 2.10.1}
Accepting request 1010227 from home:CJ:branches:devel:languages:python - Update to version 6.2.0: * Add new keyword argument Pdf.save - version 6.1.0: Rebuild wheels with qpdf 11.1.1. - version 6.0.2: * Fixed large increase in binary wheel file size for linux wheels. * Provide macOS and Linux wheels for Python 3.11. - version 6.0.1: * Use qpdf 11.1.0 - version 6.0.0: * pikepdf 6.0.0 released to align with backward incompatible changes in qpdf 11. * Remove deprecated APIs - version 5.6.1: * Made treatment of CCITT image photometry ignore BlackIs1. - version 5.6.0: * Improved support for extracting the contents of inline images. * Marked some "always should have been private" functions as deprecated with removal planned for v6, mainly in pikepdf.models.image. * Fixed all Python documentation style inconsistencies. - version 5.5.0: * Fixed undefined behavior on creating NameTree on direct object. * Fixed sdist with coverage build. * Added support for specifying QPDF's library build directory, for compatibility with QPDF's transition to cmake. * QPDF_* environment variables will modify build paths even when CFLAGS is defined. * Fixed case where GIL was not held while discarding a certain exception. * Now using cibuildwheel 2.9.0. * Many typo fixes. - version 5.4.2: * Fixed Pages.__eq__ not returning NotImplemented when it ought to. * Fixed possible problems with NameTree and NumberTree.__eq__ operators. * Changed to SPDX license headers throughout. - version 5.4.1: * Fixed ReadTheDocs build, updated versions, fixed a test warning, improved coverage, modernized type annotations. - version 5.4.0: * New feature: pikepdf.Job bindings to QPDFJob API. * New feature: pikepdf.NumberTree to support manipulation of number trees. * Many improvements to pikepdf.NameTree including the ability to instantiate a new name tree. * Several memory leaks were fixed. * Rebuilt against pybind11 2.10.0. - version 5.3.2: Build system requires changed to setuptools-scm 7.0.5. - version 5.3.1: * Fixed issue with parsing inline images, causing loss of data after inline images were encountered in a content stream. :issue:`299 - version 5.3.0: * Binary wheels for Linux aarch64 are now being rolled automatically. * Refactor JBIG2 handling to make JBIG2 decoders more testable and pluggable. * Fixed some typing issues around ObjectHelper. * Exposed some pikepdf settings that were attached to the private _qpdf module in a new pikepdf.settings module. - version 5.2.0: * Avoid versions of setuptools_scm found to cause build issues. :issue:`359` * Improved unhelpful error message when attemping to save a file with invalid encryption settings. :issue:`341` * Added workaround for XMP metadata blocks that are missing the expected namespace tag. :issue:`349` * Minor code improvements, removed some deprecated private methods. OBS-URL: https://build.opensuse.org/request/show/1010227 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=28
2022-10-19 20:04:55 +00:00
BuildRequires: %{python_module pybind11-devel >= 2.10.0}
BuildRequires: %{python_module pytest >= 6.2.5}
BuildRequires: %{python_module pytest-cov >= 3.0.0}
BuildRequires: %{python_module pytest-forked}
BuildRequires: %{python_module pytest-helpers-namespace >= 2019.1.8}
# Upstream use pytest-timeout >= 1.4.2
BuildRequires: %{python_module pytest-timeout >= 2.1.0}
BuildRequires: %{python_module pytest-xdist >= 2.5.0}
BuildRequires: %{python_module python-dateutil >= 2.8.1}
#BuildRequires: %%{python_module python-xmp-toolkit >= 2.0.1}
BuildRequires: %{python_module setuptools >= 61}
#BuildRequires: %%{python_module wheel >= 0.35}
## /SECTION
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libjpeg8-devel
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libqpdf) >= 11.5.0
- update to 5.1.0: * Rebuild against QPDF 10.6.3. * Improvements to Makefile for Apple Silicon wheels. * Fix issue where Pdf.check() would report a failure if JBIG2 decoder was not installed and the PDF contains JBIG2 content. * Some errors and inconsistencies are in the "pdfdoc" encoding provided by pikepdf have been corrected, in conjunction with fixes in libqpdf. * libqpdf 10.6.2 is required. * Previously, looking up the number of a page, given the page, required a linear search of all pages. We now use a newer QPDF API that allows quicker lookups. * Fixed gcc linker error with linking to a source-compiled version of qpdf. Thanks @jerkenbilt. * Fixed dead/obsolete link to old QPDF manual. Thanks @m-holger. * Rebuild binary wheels against qpdf 10.5.0. Note 10.6.0 has been released but requires further changes so does not work yet. * Removed some workarounds to support now-unsupported versions of pybind11. * Adjusted hypothesis test settings so it does not randomly fail on PyPy. * Mention vector vs raster images in documentation. * JBIG2 decoding is now more tightly integrated. In particular, we can now decode more types of JBIG2 image and they can be decoded using either the object or image interface. * Switch to tomli for TOML parsing. * Refactor image tests to use hypothesis more effectively and use more random issues, fixing many errors along the way. * Fixed two instances of a Python object being copied without the GIL held. May have caused some instability. Thanks @rwgk. * Further improvements to handling of 2- and 4-bit per component images. Major refactoring of relevant code and improved testing. * Mark pybind11 2.9 as supported. Thanks @QuLogic. * Improved support for images with bits per component set to values between 2 and 7 inclusive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=24
2022-03-27 18:26:34 +00:00
Requires: python-Pillow >= 9.0.0
Requires: python-lxml >= 4.0
- update to 5.1.0: * Rebuild against QPDF 10.6.3. * Improvements to Makefile for Apple Silicon wheels. * Fix issue where Pdf.check() would report a failure if JBIG2 decoder was not installed and the PDF contains JBIG2 content. * Some errors and inconsistencies are in the "pdfdoc" encoding provided by pikepdf have been corrected, in conjunction with fixes in libqpdf. * libqpdf 10.6.2 is required. * Previously, looking up the number of a page, given the page, required a linear search of all pages. We now use a newer QPDF API that allows quicker lookups. * Fixed gcc linker error with linking to a source-compiled version of qpdf. Thanks @jerkenbilt. * Fixed dead/obsolete link to old QPDF manual. Thanks @m-holger. * Rebuild binary wheels against qpdf 10.5.0. Note 10.6.0 has been released but requires further changes so does not work yet. * Removed some workarounds to support now-unsupported versions of pybind11. * Adjusted hypothesis test settings so it does not randomly fail on PyPy. * Mention vector vs raster images in documentation. * JBIG2 decoding is now more tightly integrated. In particular, we can now decode more types of JBIG2 image and they can be decoded using either the object or image interface. * Switch to tomli for TOML parsing. * Refactor image tests to use hypothesis more effectively and use more random issues, fixing many errors along the way. * Fixed two instances of a Python object being copied without the GIL held. May have caused some instability. Thanks @rwgk. * Further improvements to handling of 2- and 4-bit per component images. Major refactoring of relevant code and improved testing. * Mark pybind11 2.9 as supported. Thanks @QuLogic. * Improved support for images with bits per component set to values between 2 and 7 inclusive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=24
2022-03-27 18:26:34 +00:00
Requires: python-packaging
%python_subpackages
%description
Read and write PDFs with Python, powered by qpdf.
%prep
%setup -q -n pikepdf-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
- update to 5.1.0: * Rebuild against QPDF 10.6.3. * Improvements to Makefile for Apple Silicon wheels. * Fix issue where Pdf.check() would report a failure if JBIG2 decoder was not installed and the PDF contains JBIG2 content. * Some errors and inconsistencies are in the "pdfdoc" encoding provided by pikepdf have been corrected, in conjunction with fixes in libqpdf. * libqpdf 10.6.2 is required. * Previously, looking up the number of a page, given the page, required a linear search of all pages. We now use a newer QPDF API that allows quicker lookups. * Fixed gcc linker error with linking to a source-compiled version of qpdf. Thanks @jerkenbilt. * Fixed dead/obsolete link to old QPDF manual. Thanks @m-holger. * Rebuild binary wheels against qpdf 10.5.0. Note 10.6.0 has been released but requires further changes so does not work yet. * Removed some workarounds to support now-unsupported versions of pybind11. * Adjusted hypothesis test settings so it does not randomly fail on PyPy. * Mention vector vs raster images in documentation. * JBIG2 decoding is now more tightly integrated. In particular, we can now decode more types of JBIG2 image and they can be decoded using either the object or image interface. * Switch to tomli for TOML parsing. * Refactor image tests to use hypothesis more effectively and use more random issues, fixing many errors along the way. * Fixed two instances of a Python object being copied without the GIL held. May have caused some instability. Thanks @rwgk. * Further improvements to handling of 2- and 4-bit per component images. Major refactoring of relevant code and improved testing. * Mark pybind11 2.9 as supported. Thanks @QuLogic. * Improved support for images with bits per component set to values between 2 and 7 inclusive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=24
2022-03-27 18:26:34 +00:00
%pytest_arch
%files %{python_files}
Accepting request 1010227 from home:CJ:branches:devel:languages:python - Update to version 6.2.0: * Add new keyword argument Pdf.save - version 6.1.0: Rebuild wheels with qpdf 11.1.1. - version 6.0.2: * Fixed large increase in binary wheel file size for linux wheels. * Provide macOS and Linux wheels for Python 3.11. - version 6.0.1: * Use qpdf 11.1.0 - version 6.0.0: * pikepdf 6.0.0 released to align with backward incompatible changes in qpdf 11. * Remove deprecated APIs - version 5.6.1: * Made treatment of CCITT image photometry ignore BlackIs1. - version 5.6.0: * Improved support for extracting the contents of inline images. * Marked some "always should have been private" functions as deprecated with removal planned for v6, mainly in pikepdf.models.image. * Fixed all Python documentation style inconsistencies. - version 5.5.0: * Fixed undefined behavior on creating NameTree on direct object. * Fixed sdist with coverage build. * Added support for specifying QPDF's library build directory, for compatibility with QPDF's transition to cmake. * QPDF_* environment variables will modify build paths even when CFLAGS is defined. * Fixed case where GIL was not held while discarding a certain exception. * Now using cibuildwheel 2.9.0. * Many typo fixes. - version 5.4.2: * Fixed Pages.__eq__ not returning NotImplemented when it ought to. * Fixed possible problems with NameTree and NumberTree.__eq__ operators. * Changed to SPDX license headers throughout. - version 5.4.1: * Fixed ReadTheDocs build, updated versions, fixed a test warning, improved coverage, modernized type annotations. - version 5.4.0: * New feature: pikepdf.Job bindings to QPDFJob API. * New feature: pikepdf.NumberTree to support manipulation of number trees. * Many improvements to pikepdf.NameTree including the ability to instantiate a new name tree. * Several memory leaks were fixed. * Rebuilt against pybind11 2.10.0. - version 5.3.2: Build system requires changed to setuptools-scm 7.0.5. - version 5.3.1: * Fixed issue with parsing inline images, causing loss of data after inline images were encountered in a content stream. :issue:`299 - version 5.3.0: * Binary wheels for Linux aarch64 are now being rolled automatically. * Refactor JBIG2 handling to make JBIG2 decoders more testable and pluggable. * Fixed some typing issues around ObjectHelper. * Exposed some pikepdf settings that were attached to the private _qpdf module in a new pikepdf.settings module. - version 5.2.0: * Avoid versions of setuptools_scm found to cause build issues. :issue:`359` * Improved unhelpful error message when attemping to save a file with invalid encryption settings. :issue:`341` * Added workaround for XMP metadata blocks that are missing the expected namespace tag. :issue:`349` * Minor code improvements, removed some deprecated private methods. OBS-URL: https://build.opensuse.org/request/show/1010227 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pikepdf?expand=0&rev=28
2022-10-19 20:04:55 +00:00
%license LICENSE.txt
%doc README.md
%{python_sitearch}/pikepdf/
%{python_sitearch}/pikepdf-%{version}-py%{python_version}.egg-info/
%changelog