From e19254787ae7f1042bc35aebdfcf83e2601d99ba Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Fri, 16 May 2014 13:26:03 +0200 Subject: [PATCH] Fix setup.py to not require python-unittest2 (retired in favor of stdlib module) --- python-oauthlib-dont-require-unittest2.patch | 11 +++++++++++ python-oauthlib.spec | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 python-oauthlib-dont-require-unittest2.patch diff --git a/python-oauthlib-dont-require-unittest2.patch b/python-oauthlib-dont-require-unittest2.patch new file mode 100644 index 0000000..5ac23fe --- /dev/null +++ b/python-oauthlib-dont-require-unittest2.patch @@ -0,0 +1,11 @@ +--- setup.py.orig 2014-05-16 13:11:38.534023056 +0200 ++++ setup.py 2014-05-16 13:11:48.046011144 +0200 +@@ -19,7 +19,7 @@ + if sys.version_info[0] == 3: + tests_require = ['nose', 'pycrypto'] + else: +- tests_require = ['nose', 'unittest2', 'pycrypto', 'mock'] ++ tests_require = ['nose', 'pycrypto', 'mock'] + rsa_require = ['pycrypto'] + + requires = [] diff --git a/python-oauthlib.spec b/python-oauthlib.spec index ada51e1..54d9cf3 100644 --- a/python-oauthlib.spec +++ b/python-oauthlib.spec @@ -20,6 +20,9 @@ Group: Development/Libraries License: BSD URL: http://pypi.python.org/pypi/oauthlib Source0: http://pypi.python.org/packages/source/o/%{modname}/%{modname}-%{version}.tar.gz +# python-unittest2 is now provided by "python" package and python-unittest is retired +# adapt setup.py to reflect this fact downstream +Patch0: python-oauthlib-dont-require-unittest2.patch BuildArch: noarch @@ -74,6 +77,8 @@ very little effort. %prep %setup -q -n %{modname}-%{version} +%patch0 -p0 + # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info