Accepting request 532572 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/532572 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=33
This commit is contained in:
@@ -15,11 +15,10 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define oldpython python
|
||||
%define oldpython python
|
||||
Name: python-Cython
|
||||
Version: 0.25.1
|
||||
Version: 0.26.1
|
||||
Release: 0
|
||||
Url: http://www.cython.org
|
||||
Summary: The Cython compiler for writing C extensions for the Python language
|
||||
@@ -27,7 +26,6 @@ License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
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
|
||||
@@ -58,8 +56,6 @@ allows the compiler to generate very efficient C code from Cython code.
|
||||
%setup -q -n Cython-%{version}
|
||||
# Fix non-executable scripts
|
||||
sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py
|
||||
# Fix EOL encoding
|
||||
sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} Doc/primes.c
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
@@ -77,8 +73,12 @@ for p in cython cythonize cygdb ; do
|
||||
%prepare_alternative $p
|
||||
done
|
||||
|
||||
%{python_expand %fdupes -s %{buildroot}%{$python_sitearch}}
|
||||
%fdupes %{buildroot}%{_docdir}
|
||||
%{python_expand chmod a+x %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
|
||||
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
|
||||
$python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/Cython/Build/
|
||||
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/Cython/Build/
|
||||
%fdupes %{buildroot}%{$python_sitearch}
|
||||
}
|
||||
|
||||
%post
|
||||
%python_install_alternative cython cythonize cygdb
|
||||
@@ -86,28 +86,21 @@ done
|
||||
%postun
|
||||
%python_uninstall_alternative cython
|
||||
|
||||
%check
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1140
|
||||
sed -i.SLES11.SP4.bak -e 's/const char/char/' ./tests/run/cpdef_extern_func.pyx
|
||||
#mv ./tests/run/cpdef_extern_func.pxd ./tests/run/cpdef_extern_func.pxd.TNT.txt
|
||||
#mv ./tests/run/cpdef_extern_func.pyx ./tests/run/cpdef_extern_func.pyx.TNT.txt
|
||||
#sleep 60
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
export LANG=en_US.UTF-8
|
||||
%python_exec runtests.py -vv
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
||||
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
|
||||
%license LICENSE.txt
|
||||
%else
|
||||
%doc LICENSE.txt
|
||||
%endif
|
||||
%doc COPYING.txt README.txt ToDo.txt USAGE.txt
|
||||
%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__
|
||||
%pycache_only %{python_sitearch}/__pycache__/cython*.py*
|
||||
%{python_sitearch}/pyximport/
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user