From b5bd9c91492f5d2875f76cbe77cfc10634d94803 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 24 Dec 2023 16:41:39 -0500 Subject: [PATCH] =?UTF-8?q?Disable=20the=20awscrt=20BR/Recommends=20since?= =?UTF-8?q?=20it=20isn=E2=80=99t=20available=20on=20s390x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python-boto3.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/python-boto3.spec b/python-boto3.spec index f56723d..d6307f3 100644 --- a/python-boto3.spec +++ b/python-boto3.spec @@ -1,4 +1,10 @@ %bcond tests 1 +# We would like to have a BuildRequires and weak runtime dependency on +# python3-awscrt, which enables additional functionality and tests, but it is +# ExcludeArch: s390x (https://bugzilla.redhat.com/show_bug.cgi?id=2180988) and +# we do not want to add architecture conditionals to this package, so we omit +# the dependency for now. +%bcond awscrt 0 Name: python-boto3 Version: 1.34.11 @@ -34,12 +40,14 @@ services like Amazon S3 and Amazon EC2.} %package -n python3-boto3 Summary: %{summary} +%if %{with awscrt} # Optional dependency that enables additional functionality and additional # tests, and is needed for the import-only “smoke test”: # boto3-1.34.7/boto3/s3/transfer.py # 185: # This feature requires awscrt>=0.19.18 BuildRequires: %{py3_dist awscrt} >= 0.19.18 Recommends: %{py3_dist awscrt} >= 0.19.18 +%endif %description -n python3-boto3 %{_description} @@ -69,7 +77,7 @@ hardlink -c '%{buildroot}%{python3_sitelib}/boto3' # Integration tests require network access and real AWS resources. %pytest --ignore=tests/integration -v -n auto %else -%pyproject_check_import +%pyproject_check_import %{?!with_awscrt:-e boto3.crt} %endif %files -n python3-boto3 -f %{pyproject_files} @@ -86,7 +94,8 @@ hardlink -c '%{buildroot}%{python3_sitelib}/boto3' - Simplify the spec file by eliminating the %%pypi_name macro - Port to pyproject-rpm-macros - Save space by hardlinking duplicate JSON resource files -- Add a weak dependency on python3-awscrt +- Add a weak dependency on python3-awscrt, but disable it for now since it is + not available on s390x - Switch to the GitHub source archive and run the unit and functional tests * Tue Jan 02 2024 Gwyn Ciesla - 1.34.11-1