[python-pyzabbix] add BR: and disable tests in EPEL

piotrp piotrp at fedoraproject.org
Thu Feb 19 21:23:32 UTC 2015


commit 49ae24543784bdfc19b7b6bc652d56f7e241fa94
Author: Piotr Popieluch <piotr1212 at gmail.com>
Date:   Thu Feb 19 22:23:16 2015 +0100

    add BR: and disable tests in EPEL

 python-pyzabbix.spec | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/python-pyzabbix.spec b/python-pyzabbix.spec
index 7ecfdbf..fb89a21 100644
--- a/python-pyzabbix.spec
+++ b/python-pyzabbix.spec
@@ -5,6 +5,13 @@
 %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %endif
 
+# disable tests on rhel, python-httpretty is not available
+%if 0%{?rhel}
+%bcond_with tests
+%else
+%bcond_without tests
+%endif
+
 # enable python3 on fedora
 %if 0%{?fedora}
 %bcond_without python3
@@ -17,7 +24,7 @@
 
 Name:           python-pyzabbix
 Version:        0.7.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        PyZabbix is a Python module for working with the Zabbix API
 
 # license is in README.markdown
@@ -28,14 +35,18 @@ BuildArch:      noarch
 
 Requires:       python-requests
 BuildRequires:  python-devel
+%if %{with tests}
 BuildRequires:  python-httpretty
 BuildRequires:  python-nose
+%endif
 BuildRequires:  python-requests
+BuildRequires:  python-setuptools
 %if %{with python3}
 Requires:       python3-requests
 BuildRequires:  python3-devel
 BuildRequires:  python3-httpretty
 BuildRequires:  python3-requests
+BuildRequires:  python3-setuptools
 %if 0%{?fedora} >= 22
 BuildRequires:  python3-nose
 %endif
@@ -89,6 +100,7 @@ popd
 
 
 %check
+%if %{with tests}
 %{__python2} setup.py nosetests
 
 %if %{with python3}
@@ -96,6 +108,7 @@ popd
 %{__python3} setup.py nosetests
 %endif
 %endif
+%endif
 
 
 %files
@@ -112,5 +125,9 @@ popd
 
 
 %changelog
+* Thu Feb 19 2015 Piotr Popieluch <piotr1212 at gmail.com> - 0.7.2-2
+- Explicitly name BuildRequires: python-setuptools
+- Disabled tests for EPEL
+
 * Thu Feb 12 2015 Piotr Popieluch <piotr1212 at gmail.com> - 0.7.2-1
 - Initial package


More information about the scm-commits mailing list