Hello community,

here is the log from the commit of package python-testrepository for 
openSUSE:Factory checked in at 2017-05-22 10:47:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testrepository (Old)
 and      /work/SRC/openSUSE:Factory/.python-testrepository.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-testrepository"

Mon May 22 10:47:50 2017 rev:17 rq:496807 version:0.0.20

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-testrepository/python-testrepository.changes  
    2016-07-24 19:53:22.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-testrepository.new/python-testrepository.changes
 2017-05-22 10:48:51.821242093 +0200
@@ -1,0 +2,5 @@
+Fri May 19 14:12:32 UTC 2017 - [email protected]
+
+- Convert to singlespec
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-testrepository.spec ++++++
--- /var/tmp/diff_new_pack.vGEtiG/_old  2017-05-22 10:48:52.277177831 +0200
+++ /var/tmp/diff_new_pack.vGEtiG/_new  2017-05-22 10:48:52.281177268 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-testrepository
 #
-# 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-testrepository
 Version:        0.0.20
 Release:        0
@@ -23,16 +24,18 @@
 License:        BSD-3-Clause or Apache-2.0
 Group:          Development/Languages/Python
 Url:            https://launchpad.net/testrepository
-Source:         
http://pypi.python.org/packages/source/t/testrepository/testrepository-%{version}.tar.gz
-BuildRequires:  python-devel
-BuildRequires:  python-extras
-BuildRequires:  python-fixtures
-BuildRequires:  python-pbr
-BuildRequires:  python-python-mimeparse
-BuildRequires:  python-python-subunit >= 0.0.18
-BuildRequires:  python-setuptools
-BuildRequires:  python-testscenarios
-BuildRequires:  python-testtools >= 0.9.30
+Source:         
https://pypi.io/packages/source/t/testrepository/testrepository-%{version}.tar.gz
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module extras}
+BuildRequires:  %{python_module fixtures}
+BuildRequires:  %{python_module pbr}
+BuildRequires:  %{python_module python-mimeparse}
+BuildRequires:  %{python_module python-subunit}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module testresources}
+BuildRequires:  %{python_module testscenarios}
+BuildRequires:  %{python_module testtools}
+BuildRequires:  python-rpm-macros
 Requires:       python-extras
 Requires:       python-fixtures
 Requires:       python-python-subunit >= 0.0.10
@@ -41,12 +44,9 @@
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 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()")}
-Requires:       python-discover
-%else
 BuildArch:      noarch
-%endif
+
+%python_subpackages
 
 %description
 This project provides a database of test results which can be used as part of
@@ -62,37 +62,24 @@
 
 %prep
 %setup -q -n testrepository-%{version}
-sed -i -e "s|testr = |testr-%{py_ver} = |" \
-       -e "s|'testr'|'testr-%{py_ver}'|" setup.py
-mv testr testr-%{py_ver}
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-mkdir -p %{buildroot}%{_sysconfdir}/alternatives
-touch %{buildroot}%{_sysconfdir}/alternatives/testr
-ln -sf %{_sysconfdir}/alternatives/testr %{buildroot}/%{_bindir}/testr
-
-%check
-python setup.py test
+%python_install
+%python_clone -a %{buildroot}%{_bindir}/testr
 
 %post
-update-alternatives \
-    --install %{_bindir}/testr testr %{_bindir}/testr-%{py_ver} 20
+%python_install_alternative testr
 
-%postun
-if [ $1 -eq 0 ] ; then
-    update-alternatives --remove testr %{_bindir}/testr-%{py_ver}
-fi
+%preun
+%python_uninstall_alternative testr
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc Apache-2.0 COPYING NEWS README.txt BSD
-%{_bindir}/testr
-%{_bindir}/testr-%{py_ver}
-%ghost %{_sysconfdir}/alternatives/testr
+%python_alternative %{_bindir}/testr
 %{python_sitelib}/*
 
 %changelog


Reply via email to