diff --git a/python-nose2.changes b/python-nose2.changes index 3041eaf..976b7cd 100644 --- a/python-nose2.changes +++ b/python-nose2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 24 09:10:11 UTC 2017 - alarrosa@suse.com + +- Use singlespec macros + ------------------------------------------------------------------- Mon Feb 6 17:07:51 UTC 2017 - alarrosa@suse.com diff --git a/python-nose2.spec b/python-nose2.spec index f70af8a..7717000 100644 --- a/python-nose2.spec +++ b/python-nose2.spec @@ -13,21 +13,24 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +%{?!python_module:%define python_module() python-%{**} python3-%{**}} 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 +License: BSD-2-Clause and Python-2.0 Group: Development/Languages/Python +Url: https://github.com/nose-devs/nose2 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 +BuildRequires: %{python_module cov-core >= 1.12} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six >= 1.1} +BuildRequires: %{python_module unittest2} +BuildRequires: python-rpm-macros Requires: python-six >= 1.1 Requires(post): update-alternatives Requires(postun): update-alternatives @@ -35,6 +38,8 @@ Suggests: python-cov-core >= 1.12 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%python_subpackages + %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: @@ -60,35 +65,26 @@ new direction! %setup -q -n nose2-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -rm %{buildroot}%{_bindir}/nose2 -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -touch %{buildroot}%{_sysconfdir}/alternatives/nose2 -ln -sf %{_sysconfdir}/alternatives/nose2 %{buildroot}/%{_bindir}/nose2 +%python_clone -a %{buildroot}%{_bindir}/nose2 %check #LC_CTYPE=C.UTF8 python setup.py test %post -update-alternatives \ - --install %{_bindir}/nose2 nose2 %{_bindir}/nose2-%{py_ver} 20 +%python_install_alternative nose2 %postun -if [ $1 -eq 0 ] ; then - update-alternatives --remove nose2 %{_bindir}/nose2-%{py_ver} -fi +%python_uninstall_alternative nose2 - -%files +%files %{python_files} %defattr(-,root,root,-) %doc AUTHORS README.rst license.txt -%{_bindir}/nose2 -%{_bindir}/nose2-%{py_ver} -%ghost %{_sysconfdir}/alternatives/nose2 +%python_alternative %{_bindir}/nose2 %{python_sitelib}/* %changelog