Remove dependency on unittest2
Add remove_unittest2.patch to facilitate that OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-case?expand=0&rev=4
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 13 14:07:19 UTC 2018 - mcepl@suse.com
|
||||
|
||||
- Remove dependency on unittest2
|
||||
Add remove_unittest2.patch to facilitate that
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 15 10:57:58 UTC 2017 - tbechtold@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-case
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -23,25 +23,21 @@ Release: 0
|
||||
Summary: Python unittest Utilities
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: http://github.com/celery/case
|
||||
Source: https://pypi.io/packages/source/c/case/case-%{version}.tar.gz
|
||||
URL: http://github.com/celery/case
|
||||
Source: https://files.pythonhosted.org/packages/source/c/case/case-%{version}.tar.gz
|
||||
Patch: remove_unittest2.patch
|
||||
BuildRequires: %{python_module coverage}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python2-unittest2
|
||||
Requires: python-mock >= 2.0
|
||||
Requires: python-nose >= 1.3.7
|
||||
Requires: python-setuptools
|
||||
Requires: python-six
|
||||
%ifpython2
|
||||
Requires: python-unittest2 >= 0.5.1
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -49,19 +45,21 @@ Python unittest Utilities
|
||||
|
||||
%prep
|
||||
%setup -q -n case-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_exec setup.py test
|
||||
|
||||
%files %python_files
|
||||
%defattr(-,root,root,-)
|
||||
%doc Changelog LICENSE README.rst
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc Changelog README.rst
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
||||
31
remove_unittest2.patch
Normal file
31
remove_unittest2.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
--- a/requirements/py2.txt
|
||||
+++ b/requirements/py2.txt
|
||||
@@ -1,2 +1 @@
|
||||
-r deps/mock.txt
|
||||
-unittest2>=0.5.1
|
||||
--- a/case/case.py
|
||||
+++ b/case/case.py
|
||||
@@ -4,21 +4,15 @@ import re
|
||||
import sys
|
||||
import types
|
||||
import warnings
|
||||
+import unittest
|
||||
|
||||
from contextlib import contextmanager
|
||||
from functools import partial
|
||||
+from unittest.util import safe_repr, unorderable_list_difference
|
||||
from six import string_types, itervalues as values, iteritems as items
|
||||
|
||||
from . import mock
|
||||
|
||||
-try:
|
||||
- import unittest # noqa
|
||||
- unittest.skip
|
||||
- from unittest.util import safe_repr, unorderable_list_difference
|
||||
-except AttributeError:
|
||||
- import unittest2 as unittest # noqa
|
||||
- from unittest2.util import safe_repr, unorderable_list_difference # noqa
|
||||
-
|
||||
__all__ = ['Case']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user