forked from pool/python-Cython
Accepting request 265716 from home:posophe:branches:devel:languages:python
Fix update alternatives OBS-URL: https://build.opensuse.org/request/show/265716 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=51
This commit is contained in:
committed by
Git OBS Bridge
parent
7d36b8f501
commit
1c4cb116ce
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-Cython
|
||||
Version: 0.21
|
||||
Version: 0.21.1
|
||||
Release: 0
|
||||
Url: http://www.cython.org
|
||||
Summary: The Cython compiler for writing C extensions for the Python language
|
||||
@@ -25,8 +25,6 @@ License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: http://pypi.python.org/packages/source/C/Cython/Cython-%{version}.tar.gz
|
||||
Source1: python-Cython-rpmlintrc
|
||||
#PATCH-FIX-UPSTREAM Cython-fix-version-detection.patch https://github.com/cython/cython/commit/43342ab90704f5f850733544288485048160003d
|
||||
Patch0: Cython-fix-version-detection.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-devel
|
||||
@@ -57,7 +55,6 @@ code.
|
||||
|
||||
%prep
|
||||
%setup -q -n Cython-%{version}
|
||||
%patch0 -p1
|
||||
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}
|
||||
@@ -76,13 +73,12 @@ 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}
|
||||
rm -rf %{buildroot}%{python_sitearch}/__pycache__/
|
||||
# avoid conflicts with python 2 version
|
||||
|
||||
%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:
|
||||
[ -h %{_bindir}/cygdb ] || rm -f %{_bindir}/cygdb
|
||||
[ -h %{_bindir}/cythonize ] || rm -f %{_bindir}/cythonize
|
||||
[ -h %{_bindir}/cython ] || rm -f %{_bindir}/cython
|
||||
# Disabled testsuite as it takes a long time:
|
||||
#%%check
|
||||
#python runtests.py
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
@@ -102,12 +98,15 @@ fi
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
||||
%ghost %{_bindir}/cygdb
|
||||
%{_bindir}/cygdb
|
||||
%{_bindir}/cython
|
||||
%{_bindir}/cythonize
|
||||
%{_bindir}/cygdb-%{py_ver}
|
||||
%ghost %{_bindir}/cython
|
||||
%{_bindir}/cython-%{py_ver}
|
||||
%ghost %{_bindir}/cythonize
|
||||
%{_bindir}/cythonize-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/cygdb
|
||||
%ghost %{_sysconfdir}/alternatives/cython
|
||||
%ghost %{_sysconfdir}/alternatives/cythonize
|
||||
%{python_sitearch}/Cython/
|
||||
%{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info
|
||||
%{python_sitearch}/cython.py*
|
||||
|
Reference in New Issue
Block a user