diff --git a/python-extras.changes b/python-extras.changes index 2ed2569..1feaf82 100644 --- a/python-extras.changes +++ b/python-extras.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 1 11:09:27 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec + ------------------------------------------------------------------- Wed Aug 31 07:57:56 UTC 2016 - aplanas@suse.com diff --git a/python-extras.spec b/python-extras.spec index 69c6750..5a3052d 100644 --- a/python-extras.spec +++ b/python-extras.spec @@ -1,7 +1,7 @@ # # spec file for package python-extras # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -20,6 +20,7 @@ # enable testing with a build conditional (off by default): %bcond_with tests +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-extras Version: 1.0.0 Release: 0 @@ -28,18 +29,20 @@ License: MIT Group: Development/Languages/Python Url: https://github.com/testing-cabal/extras Source: https://pypi.io/packages/source/e/extras/extras-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} # Test requirements: %if %{with tests} -BuildRequires: python-testtools +BuildRequires: %{python_module nose} +BuildRequires: %{python_module testtools} %endif +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# Break cycle +#!BuildIgnore: python-extras BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description extras is a set of extensions to the Python standard library, originally @@ -50,20 +53,21 @@ general use outside of a testing context. %setup -q -n extras-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} %if %{with tests} %check -python setup.py test +%python_exec %{_bindir}/nosetests %endif -%files +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE NEWS README.rst -%{python_sitelib}/extras-%{version}-py%{py_ver}.egg-info/ %{python_sitelib}/extras +%{python_sitelib}/extras-%{version}-py%{python_version}.egg-info/ %changelog