diff --git a/python-requests.spec b/python-requests.spec index e1448c0..a95454b 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -1,10 +1,12 @@ # When bootstrapping Python, we cannot test this yet # RHEL does not include the test dependencies %bcond tests %{undefined rhel} +# The extras are disabled on RHEL to avoid pysocks and deprecated requests[security] +%bcond extras %{undefined rhel} Name: python-requests Version: 2.28.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: HTTP library, written in Python, for human beings License: Apache-2.0 @@ -44,10 +46,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 +%pyproject_buildrequires %{?with_extras:-x security,socks} %prep @@ -73,7 +77,8 @@ sed -i 's/ --doctest-modules//' pyproject.toml %if %{with tests} %check -%pytest -v +# test_use_proxy_from_environment needs pysocks +%pytest -v %{!?with_extras:-k "not test_use_proxy_from_environment"} %endif @@ -83,6 +88,10 @@ sed -i 's/ --doctest-modules//' pyproject.toml %changelog +* Tue Oct 10 2023 Miro Hrončok - 2.28.2-7 +- Do not package requests[security] and requests[socks] on RHEL +- Make the package build even when urllib3 won't pull in pysocks + * Tue Aug 08 2023 Karolina Surma - 2.28.2-6 - Declare the license as an SPDX expression