Hello community,

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

Package is "python-Cython"

Fri Mar 17 15:04:53 2017 rev:31 rq:479725 version:0.25.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Cython/python-Cython.changes      
2016-11-01 09:49:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-Cython.new/python-Cython.changes 
2017-03-17 15:04:54.531713847 +0100
@@ -1,0 +2,5 @@
+Mon Dec 19 17:49:22 UTC 2016 - [email protected]
+
+- update for multipython build
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-Cython.spec ++++++
--- /var/tmp/diff_new_pack.YCt7xV/_old  2017-03-17 15:04:55.255611688 +0100
+++ /var/tmp/diff_new_pack.YCt7xV/_new  2017-03-17 15:04:55.255611688 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Cython
 #
-# 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,8 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define oldpython python
 Name:           python-Cython
 Version:        0.25.1
 Release:        0
@@ -26,20 +28,22 @@
 Source:         
https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz
 Source1:        python-Cython-rpmlintrc
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module xml}
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
-BuildRequires:  python-devel
-BuildRequires:  python-xml
+BuildRequires:  python-rpm-macros
 Requires:       python-devel
 Requires:       python-xml
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
-Provides:       python-cython = %{version}
-Obsoletes:      python-cython < %{version}
-%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)")}
+%ifpython2
+Provides:       %{oldpython}-cython = %{version}
+Obsoletes:      %{oldpython}-cython < %{version}
 %endif
 
+%python_subpackages
+
 %description
 The Cython language makes writing C extensions for the Python language as
 easy as Python itself.  Cython is a source code translator based on the
@@ -63,31 +67,29 @@
 sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} 
Demos/embed/Makefile.{unix,msc.static} Doc/primes.c
 
 %build
-CFLAGS="%{optflags}" python setup.py build
+export CFLAGS="%{optflags}"
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-
+%{python_expand %$python_install
 # Prepare for update-alternatives usage
 mkdir -p %{buildroot}%{_sysconfdir}/alternatives
 for p in cython cythonize cygdb ; do
-    mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
-    ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
+    mv %{buildroot}%{_bindir}/$p 
%{buildroot}%{_bindir}/$p-%{$python_bin_suffix}
+done
+}
+for p in cython cythonize cygdb ; do
+    %prepare_alternative $p
 done
 
-%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
-rm -rf %{buildroot}%{python_sitearch}/__pycache__/
+%{python_expand %fdupes -s %{buildroot}%{$python_sitearch}}
+%fdupes %{buildroot}%{_docdir}
 
 %post
-%_sbindir/update-alternatives \
-   --install %{_bindir}/cython cython %{_bindir}/cython-%{py_ver} 30 \
-   --slave %{_bindir}/cythonize cythonize %{_bindir}/cythonize-%{py_ver} \
-   --slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver}
+%python_install_alternative cython cythonize cygdb
 
 %postun
-if [ $1 -eq 0 ] ; then
-    %_sbindir/update-alternatives --remove cython %{_bindir}/cython-%{py_ver}
-fi
+%python_uninstall_alternative cython
 
 %check
 %if 0%{?suse_version} && 0%{?suse_version} <= 1140
@@ -97,24 +99,20 @@
 #sleep 60
 %endif
 %ifarch x86_64
-python runtests.py -vv
+export LANG=en_US.UTF-8
+%python_exec runtests.py -vv
 %endif
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
-%{_bindir}/cygdb
-%{_bindir}/cython
-%{_bindir}/cythonize
-%{_bindir}/cygdb-%{py_ver}
-%{_bindir}/cython-%{py_ver}
-%{_bindir}/cythonize-%{py_ver}
-%ghost %{_sysconfdir}/alternatives/cygdb
-%ghost %{_sysconfdir}/alternatives/cython
-%ghost %{_sysconfdir}/alternatives/cythonize
+%python_alternative %{_bindir}/cygdb
+%python_alternative %{_bindir}/cython
+%python_alternative %{_bindir}/cythonize
 %{python_sitearch}/Cython/
 %{python_sitearch}/Cython-%{version}-py*.egg-info
 %{python_sitearch}/cython.py*
+%pycache_only %{python_sitearch}/__pycache__
 %{python_sitearch}/pyximport/
 
 %changelog


Reply via email to