14
0
forked from pool/python-Cython

Accepting request 121584 from home:TheBlackCat:branches:devel:languages:python

Add python 3 package

OBS-URL: https://build.opensuse.org/request/show/121584
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=11
This commit is contained in:
Todd R
2012-05-21 09:21:58 +00:00
committed by Git OBS Bridge
parent 7bbff47556
commit 7df235766e
6 changed files with 127 additions and 14 deletions

View File

@@ -15,24 +15,28 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-Cython
%define modname Cython
%define binname cython
Name: python-%{modname}
Version: 0.16
Release: 0
Url: http://www.cython.org
Summary: The Cython compiler for writing C extensions for the Python language
License: Apache-2.0
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/C/Cython/Cython-%{version}.tar.gz
Source: http://pypi.python.org/packages/source/C/%{modname}/%{modname}-%{version}.tar.gz
Source99: python-Cython-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
BuildRequires: python-devel
%if 0%{?suse_version}
%py_requires
%endif
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
Provides: python-cython = %{version}
Obsoletes: python-cython < %{version}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
The Cython language makes writing C extensions for the Python language as
@@ -50,7 +54,7 @@ libraries, and for fast C modules that speed up the execution of Python
code.
%prep
%setup -q -n Cython-%{version}
%setup -q -n %{modname}-%{version}
sed -i "1d" {Cython/Debugger/libpython,Cython/Debugger/Cygdb,cython}.py # Fix non-executable scripts
%build
@@ -58,11 +62,11 @@ CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes -s %{buildroot}
# fix EOL encoding
%__sed -i 's/\r$//' \
Demos/{callback/README.txt,callback/cheesefinder.h,embed/Makefile.unix,embed/Makefile.msc.static} \
Doc/primes.c
sed -i 's/\r$//' Demos/callback/{README.txt,cheesefinder.h}
sed -i 's/\r$//' Demos/embed/{Makefile.unix,Makefile.msc.static}
sed -i 's/\r$//' Doc/primes.c
# Disabled testsuite as it takes a long time:
#%%check
@@ -71,7 +75,12 @@ Doc/primes.c
%files
%defattr(-,root,root,-)
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
%{_bindir}/cy*
%{python_sitearch}/*
%{_bindir}/cygdb
%{_bindir}/%{binname}
%{python_sitearch}/%{modname}/
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info
%{python_sitearch}/%{binname}.py
%{python_sitearch}/%{binname}.pyc
%{python_sitearch}/pyximport/
%changelog