forked from pool/python-nose2
95 lines
3.1 KiB
RPMSpec
95 lines
3.1 KiB
RPMSpec
![]() |
#
|
||
|
# spec file for package python-nose2
|
||
|
#
|
||
|
# Copyright (c) 2017 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 http://bugs.opensuse.org/
|
||
|
|
||
|
|
||
|
Name: python-nose2
|
||
|
Version: 0.6.5
|
||
|
Release: 0
|
||
|
License: BSD-2-Clause and Python-2.0
|
||
|
Summary: Nose2 is the next generation of nicer testing for Python
|
||
|
Url: https://github.com/nose-devs/nose2
|
||
|
Group: Development/Languages/Python
|
||
|
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
|
||
|
BuildRequires: python-devel
|
||
|
BuildRequires: python-setuptools
|
||
|
BuildRequires: python-six >= 1.1
|
||
|
BuildRequires: python-cov-core >= 1.12
|
||
|
BuildRequires: python-unittest2
|
||
|
Requires: python-six >= 1.1
|
||
|
Requires(post): update-alternatives
|
||
|
Requires(postun): update-alternatives
|
||
|
Suggests: python-cov-core >= 1.12
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description
|
||
|
nose2 is the next generation of nicer testing for Python, based
|
||
|
on the plugins branch of unittest2. nose2 aims to improve on nose by:
|
||
|
|
||
|
* providing a better plugin api
|
||
|
* being easier for users to configure
|
||
|
* simplifying internal interfaces and processes
|
||
|
* supporting Python 2 and 3 from the same codebase, without translation
|
||
|
* encouraging greater community involvement in its development
|
||
|
|
||
|
In service of some those goals, some features of nose *will not* be
|
||
|
supported in nose2. See `differences`_ for a thorough rundown.
|
||
|
|
||
|
In time -- once unittest2 supports plugins -- nose2 should be able to
|
||
|
become just a collection of plugins and configuration defaults. For
|
||
|
now, it provides a plugin api similar to the one in the unittest2
|
||
|
plugins branch, and overrides various unittest2 objects.
|
||
|
|
||
|
You are witnesses at the new birth of nose, mark 2. Hope you enjoy our
|
||
|
new direction!
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n nose2-%{version}
|
||
|
|
||
|
%build
|
||
|
python setup.py build
|
||
|
|
||
|
%install
|
||
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||
|
|
||
|
rm %{buildroot}%{_bindir}/nose2
|
||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||
|
touch %{buildroot}%{_sysconfdir}/alternatives/nose2
|
||
|
ln -sf %{_sysconfdir}/alternatives/nose2 %{buildroot}/%{_bindir}/nose2
|
||
|
|
||
|
%check
|
||
|
#LC_CTYPE=C.UTF8 python setup.py test
|
||
|
|
||
|
%post
|
||
|
update-alternatives \
|
||
|
--install %{_bindir}/nose2 nose2 %{_bindir}/nose2-%{py_ver} 20
|
||
|
|
||
|
%postun
|
||
|
if [ $1 -eq 0 ] ; then
|
||
|
update-alternatives --remove nose2 %{_bindir}/nose2-%{py_ver}
|
||
|
fi
|
||
|
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc AUTHORS README.rst license.txt
|
||
|
%{_bindir}/nose2
|
||
|
%{_bindir}/nose2-%{py_ver}
|
||
|
%ghost %{_sysconfdir}/alternatives/nose2
|
||
|
%{python_sitelib}/*
|
||
|
|
||
|
%changelog
|