[packages/python-kombu] 'unittest2' functionality already in py 2.7 and 3.x

jajcus jajcus at pld-linux.org
Tue Nov 17 09:39:17 CET 2015


commit 53fce816b7e14333980f96b7037de067bba3d5be
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Nov 17 09:38:31 2015 +0100

    'unittest2' functionality already in py 2.7 and 3.x

 python-kombu.spec | 8 +++++---
 unittest2.patch   | 7 +++++++
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/python-kombu.spec b/python-kombu.spec
index 352a42c..774ac9e 100644
--- a/python-kombu.spec
+++ b/python-kombu.spec
@@ -1,7 +1,7 @@
 #
 # 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
 
@@ -14,6 +14,7 @@ License:	BSD-like
 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
@@ -21,7 +22,7 @@ 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}
@@ -35,7 +36,6 @@ BuildRequires:	python3-setuptools
 %if %{with tests}
 BuildRequires:	python3-mock
 BuildRequires:	python3-nose
-BuildRequires:	python3-unittest2
 %endif
 %endif
 Requires:	python-amqp >= 1.4.7
@@ -72,6 +72,8 @@ Dokumentacja API %{module}.
 %prep
 %setup -q -n %{module}-%{version}
 
+%patch0 -p1
+
 %build
 %if %{with python2}
 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
diff --git a/unittest2.patch b/unittest2.patch
new file mode 100644
index 0000000..26da838
--- /dev/null
+++ b/unittest2.patch
@@ -0,0 +1,7 @@
+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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-kombu.git/commitdiff/53fce816b7e14333980f96b7037de067bba3d5be



More information about the pld-cvs-commit mailing list