forked from pool/python-Cython
Accepting request 248575 from home:TheBlackCat:branches:devel:languages:python
Update to 0.21 OBS-URL: https://build.opensuse.org/request/show/248575 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=46
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-Cython
|
||||
Version: 0.20.2
|
||||
Version: 0.21
|
||||
Release: 0
|
||||
Url: http://www.cython.org
|
||||
Summary: The Cython compiler for writing C extensions for the Python language
|
||||
@@ -58,8 +58,10 @@ code.
|
||||
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/cythonize bin/cythonize-%{py_ver}
|
||||
mv bin/cygdb bin/cygdb-%{py_ver}
|
||||
sed -i "s|bin/cython|bin/cython-%{py_ver}|" setup.py
|
||||
sed -i "s|bin/cythonize|bin/cythonize-%{py_ver}|" setup.py
|
||||
sed -i "s|bin/cygdb|bin/cygdb-%{py_ver}|" setup.py
|
||||
|
||||
%build
|
||||
@@ -68,6 +70,7 @@ 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}/cythonize-%{py_ver} %{buildroot}%{_bindir}/cythonize
|
||||
ln -s %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb
|
||||
%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
|
||||
|
||||
@@ -75,12 +78,14 @@ ln -s %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb
|
||||
# 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}/cythonize ]] && rm -f %{_bindir}/cythonize
|
||||
[[ ! -L %{_bindir}/cython ]] && rm -f %{_bindir}/cython
|
||||
exit 0
|
||||
|
||||
%post
|
||||
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}
|
||||
|
||||
%preun
|
||||
@@ -99,6 +104,8 @@ fi
|
||||
%{_bindir}/cygdb-%{py_ver}
|
||||
%ghost %{_bindir}/cython
|
||||
%{_bindir}/cython-%{py_ver}
|
||||
%ghost %{_bindir}/cythonize
|
||||
%{_bindir}/cythonize-%{py_ver}
|
||||
%{python_sitearch}/Cython/
|
||||
%{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info
|
||||
%{python_sitearch}/cython.py*
|
||||
|
Reference in New Issue
Block a user