Hello community,

here is the log from the commit of package python-zope.testrunner for 
openSUSE:Factory checked in at 2013-11-15 08:38:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.testrunner (Old)
 and      /work/SRC/openSUSE:Factory/.python-zope.testrunner.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-zope.testrunner"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-zope.testrunner/python-zope.testrunner.changes
    2013-11-14 08:43:55.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-zope.testrunner.new/python-zope.testrunner.changes
       2013-11-15 08:38:22.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Nov 14 15:45:40 UTC 2013 - [email protected]
+
+- Add update-alternative support
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-zope.testrunner.spec ++++++
--- /var/tmp/diff_new_pack.vgjUmj/_old  2013-11-15 08:38:22.000000000 +0100
+++ /var/tmp/diff_new_pack.vgjUmj/_new  2013-11-15 08:38:22.000000000 +0100
@@ -35,6 +35,8 @@
 #BuildRequires:  python-unittest2
 #BuildRequires:  python-zope.interface
 #BuildRequires:  python-zope.testing
+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()")}
@@ -47,12 +49,14 @@
 
 %prep
 %setup -q -n zope.testrunner-%{version}
+sed -i "s/zope-testrunner =/zope-testrunner-%{py_ver} =/" setup.py
 
 %build
 python setup.py build
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+ln -s  %{_bindir}/zope-testrunner-%{py_ver} 
%{buildroot}%{_bindir}/zope-testrunner
 # Remove duplicate files
 %fdupes -s %{buildroot}%{python_sitelib}
 
@@ -60,10 +64,25 @@
 #%check
 #python setup.py test
 
+%pre
+# Since /usr/bin/pybabel became ghosted to be used with update-alternatives, 
we have to get rid
+# of the old binary resulting from the non-update-alternativies-ified package:
+[[ ! -L %{_bindir}/zope-testrunner ]] && rm -f %{_bindir}/zope-testrunner
+exit 0
+
+%post
+update-alternatives --install %{_bindir}/zope-testrunner zope-testrunner 
%{_bindir}/zope-testrunner-%{py_ver} 20
+
+%preun
+if [ $1 -eq 0 ] ; then
+    update-alternatives --remove zope-testrunner 
%{_bindir}/zope-testrunner-%{py_ver}
+fi
+
 %files
 %defattr(-,root,root,-)
 %doc LICENSE.rst README.rst
-%{_bindir}/zope-testrunner
+%ghost %{_bindir}/zope-testrunner
+%{_bindir}/zope-testrunner-%{py_ver}
 %{python_sitelib}/*
 
 %changelog


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to