#
# Conditional build:
%bcond_without doc # don't build doc
-%bcond_with tests # do perform "make test"
+%bcond_with tests # do perform tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
Group: Development/Languages/Python
Source0: http://pypi.python.org/packages/source/k/%{module}/%{module}-%{version}.tar.gz
# Source0-md5: 892bf89ee247c0d16d2bdd63f1ddf4c5
+Patch0: unittest2.patch
URL: http://pypi.python.org/pypi/kombu
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.612
BuildRequires: python-setuptools
%if %{with tests}
BuildRequires: python-mock
-BuildRequires: python-modules
+BuildRequires: python-modules > 1:2.7
BuildRequires: python-nose
%endif
%if %{with doc}
%if %{with tests}
BuildRequires: python3-mock
BuildRequires: python3-nose
-BuildRequires: python3-unittest2
%endif
%endif
Requires: python-amqp >= 1.4.7
%prep
%setup -q -n %{module}-%{version}
+%patch0 -p1
+
%build
%if %{with python2}
%{__python} setup.py build --build-base build-2 %{?with_tests:test}
--- /dev/null
+diff -dur kombu-3.0.29.orig/requirements/test.txt kombu-3.0.29/requirements/test.txt
+--- kombu-3.0.29.orig/requirements/test.txt 2015-09-29 23:47:57.000000000 +0200
++++ kombu-3.0.29/requirements/test.txt 2015-11-17 09:33:19.000000000 +0100
+@@ -1,3 +1,2 @@
+ nose
+-unittest2>=0.5.0
+ mock