Hello community,

here is the log from the commit of package python-Cython for openSUSE:Factory 
checked in at 2013-10-17 14:31:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Cython (Old)
 and      /work/SRC/openSUSE:Factory/.python-Cython.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Cython"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Cython/python-Cython.changes      
2013-05-16 11:25:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-Cython.new/python-Cython.changes 
2013-10-17 17:45:21.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Oct 11 17:06:20 UTC 2013 - [email protected]
+
+- Implement update-alternatives
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-Cython.spec ++++++
--- /var/tmp/diff_new_pack.c82mQJ/_old  2013-10-17 17:45:22.000000000 +0200
+++ /var/tmp/diff_new_pack.c82mQJ/_new  2013-10-17 17:45:22.000000000 +0200
@@ -29,6 +29,8 @@
 BuildRequires:  python-devel
 Provides:       python-cython = %{version}
 Obsoletes:      python-cython < %{version}
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %endif
@@ -52,14 +54,37 @@
 %setup -q -n Cython-%{version}
 sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py # Fix 
non-executable scripts
 sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} 
Demos/embed/Makefile.{unix,msc.static} Doc/primes.c # Fix EOL encoding
+mv bin/cython bin/cython-%{py_ver}
+mv bin/cygdb bin/cygdb-%{py_ver}
+sed -i "s|bin/cython|bin/cython-%{py_ver}|" setup.py
+sed -i "s|bin/cygdb|bin/cygdb-%{py_ver}|" setup.py
 
 %build
 CFLAGS="%{optflags}" python setup.py build
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+ln -s  %{_bindir}/cython-%{py_ver} %{buildroot}%{_bindir}/cython
+ln -s  %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb
 %fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
 
+%pre
+# Since /usr/bin/cython and /usr/bin/cygdb 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}/cygdb ]] && rm -f %{_bindir}/cygdb
+[[ ! -L %{_bindir}/cython ]] && rm -f %{_bindir}/cython
+exit 0
+
+%post
+update-alternatives \
+   --install %{_bindir}/cython cython %{_bindir}/cython-%{py_ver} 30 \
+   --slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver}
+
+%preun
+if [ $1 -eq 0 ] ; then
+    update-alternatives --remove cython %{_bindir}/cython-%{py_ver}
+fi
+
 # Disabled testsuite as it takes a long time:
 #%%check
 #python runtests.py
@@ -67,8 +92,10 @@
 %files
 %defattr(-,root,root,-)
 %doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
-%{_bindir}/cygdb
-%{_bindir}/cython
+%ghost %{_bindir}/cygdb
+%{_bindir}/cygdb-%{py_ver}
+%ghost %{_bindir}/cython
+%{_bindir}/cython-%{py_ver}
 %{python_sitearch}/Cython/
 %{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info
 %{python_sitearch}/cython.py*

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

Reply via email to