modernize spec file

This commit is contained in:
Jonathan 2022-09-01 01:15:24 -05:00
parent 7bf7448c1e
commit 9be2528de0

View File

@ -2,9 +2,9 @@
Name: python-%{srcname}
Version: 2.1.2
Release: 1%{?dist}
Summary: Python library for passing trusted data to untrusted environments
License: BSD
Release: 2%{?dist}
Summary: Library for passing trusted data to untrusted environments
License: BSD-3-Clause
URL: https://itsdangerous.palletsprojects.com
Source0: %{pypi_source}
BuildArch: noarch
@ -14,7 +14,7 @@ Itsdangerous is a Python library for passing data through untrusted
environments (for example, HTTP cookies) while ensuring the data is not
tampered with.
Internally itsdangerous uses HMAC and SHA1 for signing by default and bases the
Internally itsdangerous uses HMAC and SHA1 for signing by default and bases the
implementation on the Django signing module. It also however supports JSON Web
Signatures (JWS).}
@ -23,34 +23,43 @@ Signatures (JWS).}
%package -n python3-%{srcname}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
# for tests
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(freezegun)
%description -n python3-%{srcname} %{_description}
Python 3 version.
%prep
%autosetup -n %{srcname}-%{version}
rm -vr src/*.egg-info
%generate_buildrequires
%pyproject_buildrequires
%build
%py3_build
%pyproject_wheel
%install
%py3_install
%pyproject_install
%pyproject_save_files itsdangerous
%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %python3 -m pytest -v
%pytest
%files -n python3-%{srcname}
%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.rst
%doc CHANGES.rst README.rst
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%changelog
* Thu Sep 01 2022 Jonathan Wright <jonathan@almalinux.org> - 2.1.2-2
- modernize spec file
* Thu Sep 01 2022 Jonathan Wright <jonathan@almalinux.org> - 2.1.2-1
- update to 2.1.2
- rhbz#2055967