2014-01-05 00:58:49 +01:00
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
%define tarname Cython
|
2014-01-05 00:58:49 +01:00
|
|
|
%define develname %mklibname -d %{name}
|
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
|
|
|
|
Summary: Language for writing C extensions to Python
|
2012-10-03 23:20:47 +04:00
|
|
|
Name: python-cython
|
2014-01-05 00:58:49 +01:00
|
|
|
Version: 0.19.2
|
2013-12-29 20:51:04 +04:00
|
|
|
Release: 1
|
|
|
|
Source0: https://pypi.python.org/packages/source/C/Cython/Cython-%{version}.tar.gz
|
2012-02-01 14:24:13 +04:00
|
|
|
License: Apache License
|
|
|
|
Group: Development/Python
|
|
|
|
Url: http://www.cython.org
|
2014-01-05 02:22:19 +04:00
|
|
|
BuildRequires: pkgconfig(python)
|
2014-01-05 02:13:20 +04:00
|
|
|
BuildRequires: pythonegg(setuptools)
|
2012-02-01 14:24:13 +04:00
|
|
|
BuildRequires: dos2unix
|
2014-01-05 00:58:49 +01:00
|
|
|
BuildRequires: emacs
|
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
Cython is a language that facilitates the writing of C extensions for
|
|
|
|
the Python language. It is based on Pyrex, but provides more cutting
|
|
|
|
edge functionality and optimizations.
|
|
|
|
|
2013-03-28 16:43:26 +04:00
|
|
|
|
2014-01-05 00:58:49 +01:00
|
|
|
#-------------
|
|
|
|
%package -n %{develname}
|
|
|
|
Summary: Devel files for %{name}
|
|
|
|
Group: Development/Python
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n %{develname}
|
|
|
|
Devel files for %{name}.
|
2013-03-28 16:43:26 +04:00
|
|
|
|
2014-01-05 00:58:49 +01:00
|
|
|
%files -n %{develname}
|
|
|
|
%doc *.txt
|
|
|
|
%{py_platsitedir}/Cython/Utility/*.c
|
|
|
|
%{py_platsitedir}/Cython/Utility/*.h
|
|
|
|
%{py_platsitedir}/Cython/Utility/*.cpp
|
|
|
|
%{py_platsitedir}/Cython/Debugger/Tests/*.c
|
2013-03-28 16:43:26 +04:00
|
|
|
|
2014-01-05 00:58:49 +01:00
|
|
|
#-----------------
|
2012-02-01 14:24:13 +04:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{tarname}-%{version}
|
2014-01-05 00:58:49 +01:00
|
|
|
# Fix non-executable scripts
|
|
|
|
sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py
|
|
|
|
sed -i "s|^#!.*||" cython.py
|
2012-02-01 14:24:13 +04:00
|
|
|
|
2014-01-05 00:58:49 +01:00
|
|
|
# Fix EOL encoding
|
|
|
|
sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h}
|
|
|
|
sed -i "s|\r||" Demos/embed/Makefile.{unix,msc.static}
|
|
|
|
sed -i "s|\r||" Doc/primes.c
|
2013-03-28 16:43:26 +04:00
|
|
|
|
|
|
|
%build
|
2014-01-05 00:58:49 +01:00
|
|
|
CFLAGS="%{optflags}" python setup.py build
|
2013-03-28 16:43:26 +04:00
|
|
|
|
|
|
|
|
2014-01-05 02:13:20 +04:00
|
|
|
%install
|
2012-02-01 14:24:13 +04:00
|
|
|
find -name .*DS_Store* | xargs rm -rf
|
2014-01-05 00:58:49 +01:00
|
|
|
python setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
rm -rf %{buildroot}%{py_platsitedir}/setuptools/tests
|
2012-02-01 14:24:13 +04:00
|
|
|
|
|
|
|
pushd Tools
|
|
|
|
dos2unix cython-mode.el
|
2014-01-05 02:13:20 +04:00
|
|
|
install -m 755 -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
|
|
|
|
install -m 644 *.el* %{buildroot}%{_sysconfdir}/emacs/site-start.d
|
2013-03-28 16:43:26 +04:00
|
|
|
popd
|
2012-02-01 14:24:13 +04:00
|
|
|
|
2014-01-05 02:13:20 +04:00
|
|
|
|
2012-10-03 23:20:47 +04:00
|
|
|
%files
|
2014-01-05 00:58:49 +01:00
|
|
|
%doc *.txt Demos Doc Tools
|
2013-12-29 20:51:04 +04:00
|
|
|
%{_bindir}/cython
|
|
|
|
%{_bindir}/cygdb
|
2014-01-05 00:58:49 +01:00
|
|
|
%{py_platsitedir}/Cython
|
|
|
|
%{py_platsitedir}/cython.py*
|
|
|
|
%{py_platsitedir}/pyximport
|
|
|
|
%{py_platsitedir}/Cython*egg-info
|
|
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*.el*
|
|
|
|
# in devel
|
|
|
|
%exclude %{py_platsitedir}/Cython/Utility/*.c
|
|
|
|
%exclude %{py_platsitedir}/Cython/Utility/*.cpp
|
|
|
|
%exclude %{py_platsitedir}/Cython/Utility/*.h
|
|
|
|
%exclude %{py_platsitedir}/Cython/Debugger/Tests/cfuncs.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
|