diff --git a/python-testresources.changes b/python-testresources.changes index f757eef..a2559c6 100644 --- a/python-testresources.changes +++ b/python-testresources.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Apr 9 13:28:52 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Fixed source URL + ------------------------------------------------------------------- Mon Nov 14 14:13:03 UTC 2016 - dmueller@suse.com diff --git a/python-testresources.spec b/python-testresources.spec index b0d5b84..a4ffde9 100644 --- a/python-testresources.spec +++ b/python-testresources.spec @@ -1,7 +1,7 @@ # # spec file for package python-testresources # -# 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 @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-testresources Version: 2.0.1 Release: 0 @@ -23,17 +24,18 @@ Summary: Testresources, a pyunit extension for managing expensive test re License: (Apache-2.0 or BSD-3-Clause) and GPL-2.0+ Group: Development/Languages/Python Url: https://launchpad.net/testresources -Source: http://pypi.python.org/packages/source/t/testresources/testresources-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-pbr -BuildRequires: python-setuptools -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 +Source: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module fixtures} +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module testtools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-pbr +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%python_subpackages %description testresources: extensions to python unittest to allow declarative use @@ -43,17 +45,19 @@ of resources by test cases. %setup -q -n testresources-%{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} %check -python setup.py test +%python_expand LANG=en_US.UTF-8 PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m testtools.run discover -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/testresources +%{python_sitelib}/testresources-%{version}-py%{python_version}.egg-info %changelog