From ab88e0da153ae8c2fccdee73878e75a069b74dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 10 Oct 2023 14:08:28 +0200 Subject: [PATCH] Move lines around to resemble the example Python specfile https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file --- python-requests.spec | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/python-requests.spec b/python-requests.spec index 46597f3..56e98ed 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -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. Python’s 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. Python’s 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. Python’s 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}