3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
8 Summary: Language for writing Python Extension Modules (Python 2.x version)
9 Summary(pl.UTF-8): Język służący do pisania modułów rozszerzających Pythona (wersja dla Pythona 2.x)
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: http://cython.org/release/%{module}-%{version}.tar.gz
16 # Source0-md5: db3c5b365e1c3f71c7cd90e96473a3ab
17 URL: http://cython.org/
19 BuildRequires: python >= 1:2.6
20 BuildRequires: python-devel >= 1:2.6
21 BuildRequires: python-setuptools
24 BuildRequires: python3 >= 1:3.2
25 BuildRequires: python3-2to3 >= 1:3.2
26 BuildRequires: python3-devel >= 1:3.2
27 BuildRequires: python3-modules >= 1:3.2
28 BuildRequires: python3-setuptools
30 BuildRequires: rpm-pythonprov
31 Requires: python-devel >= 1:2.6
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _noautocompressdoc *.c
37 Cython lets you write code that mixes Python and C data types any way
38 you want, and compiles it into a C extension for Python. Cython is
41 This package contains Cython module for Python 2.x.
43 %description -l pl.UTF-8
44 Cython pozwala pisać kod zawierający dane Pythona i języka C połączone
45 w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
46 Cython jest oparty na Pyreksie.
48 Ten pakiet zawiera moduł Cython dla Pythona 2.x.
50 %package -n python3-Cython
51 Summary: Language for writing Python Extension Modules (Python 3.x version)
52 Summary(pl.UTF-8): Język służący do pisania modułów rozszerzających Pythona (wersja dla Pythona 3.x)
53 Group: Libraries/Python
54 Requires: python3-devel >= 1:3.2
56 %description -n python3-Cython
57 Cython lets you write code that mixes Python and C data types any way
58 you want, and compiles it into a C extension for Python. Cython is
61 This package contains Cython module for Python 3.x.
63 %description -n python3-Cython -l pl.UTF-8
64 Pyrex pozwala pisać kod zawierający dane Pythona i języka C połączone
65 w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
66 Cython jest oparty na Pyreksie.
68 Ten pakiet zawiera moduł Cython dla Pythona 3.x.
71 Summary: Examples for Cython language
72 Summary(pl.UTF-8): Przykłady programów w języku Cython
73 Group: Libraries/Python
74 Obsoletes: python3-Cython-examples
77 This package contains example programs for Cython language.
79 %description examples -l pl.UTF-8
80 Pakiet zawierający przykładowe programy napisane w języku Cython.
83 %setup -q -n %{module}-%{version}
88 CFLAGS="%{rpmcflags}" \
89 %{__python} setup.py build \
95 CFLAGS="%{rpmcflags}" \
96 %{__python3} setup.py build \
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
105 %{__python3} setup.py \
107 --build-base build-3 \
111 --root=$RPM_BUILD_ROOT
113 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cython{,3}
114 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cythonize{,3}
115 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cygdb{,3}
119 %{__python} setup.py \
121 --build-base build-2 \
125 --root=$RPM_BUILD_ROOT
127 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -a ! -name 'Lexicon.py' -exec rm -f {} \;
130 cp -a Demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
133 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
139 %attr(755,root,root) %{_bindir}/cython
140 %attr(755,root,root) %{_bindir}/cythonize
141 %attr(755,root,root) %{_bindir}/cygdb
142 %{py_sitedir}/cython.py[co]
144 %{py_sitedir}/pyximport
145 %{py_sitedir}/Cython-%{version}-py*.egg-info
149 %files -n python3-Cython
150 %defattr(644,root,root,755)
151 %doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
152 %attr(755,root,root) %{_bindir}/cython3
153 %attr(755,root,root) %{_bindir}/cythonize3
154 %attr(755,root,root) %{_bindir}/cygdb3
155 %{py3_sitedir}/cython.py
156 %{py3_sitedir}/__pycache__/cython.*
157 %{py3_sitedir}/Cython
158 %{py3_sitedir}/pyximport
159 %{py3_sitedir}/Cython-%{version}-py*.egg-info
163 %defattr(644,root,root,755)
164 %{_examplesdir}/%{name}-%{version}