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. python-django). 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.
This commit is contained in:
parent
a7b7620632
commit
a2a67038ae
1 changed files with 6 additions and 10 deletions
|
|
@ -1,12 +1,8 @@
|
|||
# When bootstrapping Python, we cannot test this yet
|
||||
# RHEL does not include the test dependencies and the dependencies for extras
|
||||
%if 0%{?rhel}
|
||||
%bcond_with tests
|
||||
%bcond_with extras
|
||||
%else
|
||||
%bcond_without tests
|
||||
%bcond_without extras
|
||||
%endif
|
||||
%bcond tests %{undefined rhel}
|
||||
%bcond extras %[%{undefined rhel} || %{defined eln}]
|
||||
%bcond extradeps %{undefined rhel}
|
||||
|
||||
Name: python-urllib3
|
||||
Version: 2.2.3
|
||||
|
|
@ -110,7 +106,7 @@ Requires: ca-certificates
|
|||
BuildRequires: %{py3_dist idna}
|
||||
Requires: %{py3_dist idna}
|
||||
|
||||
%if %{with extras}
|
||||
%if %{with extradeps}
|
||||
# There has historically been a manual hard dependency on python3-pysocks;
|
||||
# since bringing it in is the sole function of python3-urllib3+socks,
|
||||
# we recommend it, so it is installed by default.
|
||||
|
|
@ -152,7 +148,7 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d
|
|||
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
|
||||
# Generate BR’s from packaged extras even when tests are disabled, to ensure
|
||||
# the extras metapackages are installable if the build succeeds.
|
||||
%pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks,h2}
|
||||
%pyproject_buildrequires %{?with_extradeps:-x brotli,zstd,socks,h2}
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -173,7 +169,7 @@ export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
|
|||
# urllib3.contrib.ntlmpool is deprecated and requires ntlm
|
||||
# urllib3.contrib.securetransport is macOS only
|
||||
# urllib3.contrib.pyopenssl requires pyOpenSSL
|
||||
%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks -e urllib3.http2*}
|
||||
%{pyproject_check_import %{!?with_extradeps:-e urllib3.contrib.socks -e urllib3.http2*}
|
||||
-e urllib3.contrib.emscripten*
|
||||
-e urllib3.contrib.ntlmpool
|
||||
-e urllib3.contrib.securetransport
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue