%{?!python3_pkgversion:%global python3_pkgversion 3} %global srcname pdfreader Name: python-%{srcname} Version: 0.1.15 Release: 2%{?dist} Summary: Pythonic API for parsing PDF files License: MIT Licence URL: http://github.com/maxpmaxp/pdfreader Source0: https://github.com/maxpmaxp/pdfreader/archive/refs/tags/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %{?python_enable_dependency_generator} %define _description %{expand: *pdfreader* is a Pythonic API for: * extracting texts, images and other data from PDF documents (plain or protected) * accessing different objects within PDF documents } %description %_description %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} sed -i requirements.txt -e 's/==/>=/' sed -i setup.py \ -e '/install_requires=/s/\(pycryptodome\)/\1x/' %build %py3_build %install rm -rf $RPM_BUILD_ROOT %py3_install %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE THIRD-PARTY-NOTICES %doc CHANGELOG.txt CONTRIBUTING.rst README.rst SECURITY.md # For noarch packages: sitelib %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog * Sun May 05 2024 Martin RS - 0.1.15 - Update * Sat Sep 03 2022 Martin RS - 0.1.12 - Initial