Don't run tests requiring pytz on RHEL

pytz is unwanted on RHEL 10+.
This commit is contained in:
Miro Hrončok 2023-03-09 12:55:39 +01:00
parent 5c59e50b4e
commit 231f32cf96

View File

@ -6,7 +6,7 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 39.0.2 Version: 39.0.2
Release: 1%{?dist} Release: 2%{?dist}
Summary: PyCA's cryptography library Summary: PyCA's cryptography library
# cryptography is dual licensed under the Apache-2.0 and BSD-3-Clause, # cryptography is dual licensed under the Apache-2.0 and BSD-3-Clause,
@ -41,11 +41,11 @@ BuildRequires: python%{python3_pkgversion}-hypothesis >= 1.11.4
BuildRequires: python%{python3_pkgversion}-iso8601 BuildRequires: python%{python3_pkgversion}-iso8601
BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-pretend
BuildRequires: python%{python3_pkgversion}-pytest-xdist BuildRequires: python%{python3_pkgversion}-pytest-xdist
BuildRequires: python%{python3_pkgversion}-pytz
%endif %endif
BuildRequires: python%{python3_pkgversion}-pytest >= 6.2.0 BuildRequires: python%{python3_pkgversion}-pytest >= 6.2.0
BuildRequires: python%{python3_pkgversion}-pytest-benchmark BuildRequires: python%{python3_pkgversion}-pytest-benchmark
BuildRequires: python%{python3_pkgversion}-pytest-subtests >= 0.3.2 BuildRequires: python%{python3_pkgversion}-pytest-subtests >= 0.3.2
BuildRequires: python%{python3_pkgversion}-pytz
%endif %endif
%description %description
@ -97,8 +97,8 @@ find . -name .keep -print -delete
%check %check
%if %{with tests} %if %{with tests}
%if 0%{?rhel} %if 0%{?rhel}
# skip hypothesis tests on RHEL # skip hypothesis and pytz tests on RHEL
rm -rf tests/hypothesis rm -rf tests/hypothesis tests/x509
# append skipper to skip iso8601 and pretend tests # append skipper to skip iso8601 and pretend tests
cat < %{SOURCE2} >> tests/conftest.py cat < %{SOURCE2} >> tests/conftest.py
%endif %endif
@ -126,6 +126,9 @@ PYTHONPATH=${PWD}/vectors:%{buildroot}%{python3_sitearch} \
%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info %{python3_sitearch}/%{srcname}-%{version}-py*.egg-info
%changelog %changelog
* Thu Mar 09 2023 Miro Hrončok <mhroncok@redhat.com> - 39.0.2-2
- Don't run tests requiring pytz on RHEL
* Sat Mar 04 2023 Christian Heimes <cheimes@redhat.com> - 39.0.2-1 * Sat Mar 04 2023 Christian Heimes <cheimes@redhat.com> - 39.0.2-1
- Update to 39.0.2, resolves rhbz#2124729 - Update to 39.0.2, resolves rhbz#2124729