Move lines around to resemble the example Python specfile

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file
This commit is contained in:
Miro Hrončok 2023-10-10 14:08:28 +02:00
parent a5e331ad3f
commit ab88e0da15

View File

@ -12,6 +12,7 @@ Summary: HTTP library, written in Python, for human beings
License: Apache-2.0
URL: https://pypi.io/project/requests
Source: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
# Explicitly use the system certificates in ca-certificates.
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
Patch: system-certs.patch
@ -20,18 +21,7 @@ Patch: system-certs.patch
Patch: https://github.com/psf/requests/commit/74ea7cf7a6.patch#/CVE-2023-32681.patch
BuildArch: noarch
%description
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Pythons built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.
%package -n python%{python3_pkgversion}-requests
Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-httpbin)
@ -39,6 +29,15 @@ BuildRequires: python3dist(pytest-mock)
BuildRequires: python3dist(trustme)
%endif
%description
Most existing Python modules for sending HTTP requests are extremely verbose and
cumbersome. Pythons built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.
%package -n python%{python3_pkgversion}-requests
Summary: %{summary}
%description -n python%{python3_pkgversion}-requests
Most existing Python modules for sending HTTP requests are extremely verbose and
@ -46,10 +45,12 @@ cumbersome. Pythons built-in urllib2 module provides most of the HTTP
capabilities you should need, but the API is thoroughly broken. This library is
designed to make HTTP requests easy for developers.
%if %{with extras}
%pyproject_extras_subpkg -n python%{python3_pkgversion}-requests security socks
%endif
%generate_buildrequires
%pyproject_buildrequires %{?with_extras:-x security,socks}