File python-unittest2.spec of Package python-unittest2

#
# spec file for package python-unittest2
#
# Copyright (c) 2019 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-unittest2
Version:        1.1.0
Release:        lp151.67.4
Summary:        The new features in unittest for Python 2.7 backported to Python 2.3+
License:        BSD-3-Clause
URL:            https://pypi.python.org/pypi/unittest2
Source:         https://files.pythonhosted.org/packages/source/u/unittest2/unittest2-%{version}.tar.gz
# PATCH-FIX-OPENSUSE relax-argparse.patch
Patch1:         relax-argparse.patch
BuildRequires:  %{python_module linecache2}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six}
BuildRequires:  %{python_module traceback2}
BuildRequires:  python-rpm-macros
Requires:       python-six
Requires:       python-traceback2
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch:      noarch
%python_subpackages

%description
unittest2 is a backport of the new features added to the unittest testing
framework in Python 2.7. It is tested to run on Python 2.4 - 2.7.

%prep
%setup -q -n unittest2-%{version}
%patch1 -p1

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/unit2

%post
%python_install_alternative unit2

%preun
%python_uninstall_alternative unit2

%files %{python_files}
%doc README.txt
%python_alternative %{_bindir}/unit2
%{python_sitelib}/unittest2
%{python_sitelib}/unittest2-%{version}-py*.egg-info

%changelog
* Thu Oct 17 2019 Tomáš Chvátal <tchvatal@suse.com>
- Remove pyparsing buildignore as the cycle was solved
* Thu Jan 17 2019 Dominique Leuenberger <dimstar@opensuse.org>
- BuildIgnore python[23]-pyparsing: python-packaging requires it
  for some actions it could perform, but we don't make use of these
  here. Ignoring this dependency allows us to break open a
  BuildCycle.
* Fri Aug 10 2018 tchvatal@suse.com
- Drop the devel dependency
* Wed Nov  8 2017 mpluskal@suse.com
- Do not require arparse at all - it is already part of python
* Mon Jul  3 2017 tbechtold@suse.com
- Fix Source url
* Mon May 22 2017 tbechtold@suse.com
- Convert to singlespec
- Add relax-argparse.patch
* Wed Mar 15 2017 tbechtold@suse.com
- Add Provides for python2-unittest2 . Needed for the singlespec
  approach
* Mon Aug 15 2016 toddrme2178@gmail.com
- Fix update-alternatives implementation.
* Tue Oct 13 2015 toddrme2178@gmail.com
- Implement update-alternatives
* Mon Oct 12 2015 toddrme2178@gmail.com
- update to version 1.1.0:
  * Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns()
    and assertWarnsRegex() assertments now check the type of the first
    argument to prevent possible user error. Based on patch by Daniel
    Wagner-Hall.
  * Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns()
    and assertWarnsRegex() checks now emits a deprecation warning when
    callable is None or keyword arguments except msg is passed in the
    context manager mode.
  * Issue #22903: The fake test case created by unittest.loader when
    it fails importing a test module is now picklable.
- update to version 1.0.1:
  * Unittest2 issue #94: Need at least 1.4 of six.
- update to version 1.0.0:
  * Issue #22936: Permit showing local variables in tracebacks.
- specfile:
  * added traceback2, linecache2 requirement
  * Implement update-alternatives
* Mon Dec  1 2014 rhafer@suse.com
- Update to 0.8
  * Issue #22457: Honour load_tests in the start_dir of discovery.
  * 0.7.1:
  - Fix for 0.7.0 being broken. Also switches from both manual and entrypoint
    scripts to just entrypoint scripts to reduce the possibility of similar
    oversights in future.
  * 0.7.0
  - This release contains backports from cPython 3.5 of all (I think) commits
    since 2010, as of today.
  * 0.6.0
  - Changed supported Python versions to start at 2.6, and include all released
    3.x and pypy. (Robert Collins)
  - Invoking `unit2` without args starts test discovery
  - Added `TestCase.assertWarns` and `TestCase.assertWarnsRegexp` context
    managers
  - Fix Python issue 9926. TestSuite subclasses that override __call__ are
    called correctly.
  - Removed unused `maxDiff` parameter from `TestCase.assertSequenceEqual`.
  - DeprecationWarning for unsupported result objects (missing addSkip
    method) became RuntimeWarning.
  - Addition of `TestCase.assertWarns` as a context manager.
- removed py3k tarball, was not used and does not exist for 0.8.0 anymore
* Sat Jun  9 2012 highwaystar.ru@gmail.com
- python3 package added
- spec file improved (files section)
* Fri Sep  2 2011 saschpe@suse.de
- Cleaned up spec file
- Changed license to BSD-3-Clause
* Tue Aug 10 2010 pascal.bleser@opensuse.org
- initial package (0.5.1)
openSUSE Build Service is sponsored by