From 72017f21b4ad4aa72c4963e5998f67d71e06143c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 11 Aug 2024 22:02:15 -0400 Subject: [PATCH] Add extras to ELN builds RHEL 10 only ships the core module with no extras, but the extras are needed for other things in EPEL (e.g. azure-cli). ELN covers both without adding the extras build dependencies so as to not add them to the future RHEL buildroot. These changes allow a single ELN build to serve both ELN and ELN Extras without polluting the ELN buildroot. --- python-requests.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-requests.spec b/python-requests.spec index 0c455c0..950ebc7 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -2,7 +2,8 @@ # 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} +%bcond extras %[%{undefined rhel} || %{defined eln}] +%bcond extradeps %{undefined rhel} Name: python-requests Version: 2.32.3 @@ -63,7 +64,7 @@ designed to make HTTP requests easy for developers. %generate_buildrequires -%pyproject_buildrequires %{?with_extras:-x security,socks} +%pyproject_buildrequires %{?with_extradeps:-x security,socks} %prep @@ -92,7 +93,7 @@ sed -i 's/ --doctest-modules//' pyproject.toml %if %{with tests} # test_unicode_header_name - reported: https://github.com/psf/requests/issues/6734 # test_use_proxy_from_environment needs pysocks -%pytest -v tests -k "not test_unicode_header_name %{!?with_extras:and not test_use_proxy_from_environment}" +%pytest -v tests -k "not test_unicode_header_name %{!?with_extradeps:and not test_use_proxy_from_environment}" %endif