From 21333c8e105aa4312e36df6752831b31576184f7 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 6 Dec 2021 10:59:16 +0800 Subject: [PATCH] add macros to disable tests temporary --- pytz.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pytz.spec b/pytz.spec index ab04349..4b2720d 100644 --- a/pytz.spec +++ b/pytz.spec @@ -1,6 +1,8 @@ +%bcond_with tests + Name: pytz Version: 2021.1 -Release: 1 +Release: 2 Summary: World Timezone Definitions for Python License: MIT URL: http://pytz.sourceforge.net/ @@ -21,7 +23,10 @@ Python Library Reference (datetime.tzinfo). %package -n python3-pytz Summary: python3 for pytz -BuildRequires: python3-devel python3-pytest +BuildRequires: python3-devel +%if %{with tests} +BuildRequires: python3-pytest +%endif Requires: tzdata %{?python_provide:%python_provide python3-%{name}} @@ -41,7 +46,9 @@ pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib} sed -i '/pytz\/zoneinfo\/Asia\/Macau/d' %{buildroot}%{python3_sitelib}/*.egg-info/SOURCES.txt %check +%if %{with tests} PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v +%endif %files -n python3-pytz %defattr(-,root,root) @@ -50,6 +57,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v %{python3_sitelib}/* %changelog +* Mon Dec 06 2021 gaihuiying - 2021.1-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add macros to disable tests temporary + * Mon Aug 09 2021 OpenStack_SIG - 2021.1-1 - Update version to 2021.1 -- Gitee