Accepting request 1178259 from home:mslacken:ml

Sorry, didn't see that the version was hard coded in the URL

OBS-URL: https://build.opensuse.org/request/show/1178259
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pypdf?expand=0&rev=1
This commit is contained in:
2024-06-03 16:18:33 +00:00
committed by Git OBS Bridge
commit bcd4c914fc
5 changed files with 1719 additions and 0 deletions

69
python-pypdf.spec Normal file
View File

@@ -0,0 +1,69 @@
#
# spec file for package python-pypdf
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: python-pypdf
Version: 4.2.0
Release: 0
Summary: PDF toolkit
License: BSD-3-Clause
URL: https://github.com/py-pdf/pypdf
Source0: https://github.com/py-pdf/pypdf/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module flit}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildArch: noarch
Provides: python3-PyPDF2 = %version-%release
Obsoletes: python3-PyPDF2 < %version-%release
%python_subpackages
%description
A Pure-Python library built as a PDF toolkit. It is capable of:
- extracting document information (title, author, ...),
- splitting documents page by page,
- merging documents page by page,
- cropping pages,
- merging multiple pages into a single page,
- encrypting and decrypting PDF files.
By being Pure-Python, it should run on any Python platform without any
dependencies on external libraries. It can also work entirely on StringIO
objects rather than file streams, allowing for PDF manipulation in memory.
It is therefore a useful tool for websites that manage or manipulate PDFs.
%prep
%autosetup -n pypdf-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%fdupes %{buildroot}%{python_sitelib}/pypdf
# no checks possible as large pdf downloaded from the internet are necessary
%files %{python_files}
%license LICENSE
%doc CHANGELOG.md
%{python_sitelib}/pypdf
%{python_sitelib}/pypdf-%{version}*-info
%changelog