- python 3.6
[packages/python-Cython.git] / python-Cython.spec
CommitLineData
50da0181
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
c851376d 5
6%define module Cython
7
50da0181
JB
8Summary: Language for writing Python Extension Modules (Python 2.x version)
9Summary(pl.UTF-8): Język służący do pisania modułów rozszerzających Pythona (wersja dla Pythona 2.x)
c851376d 10Name: python-%{module}
da43f606 11Version: 0.24.1
324ab2b7 12Release: 2
e752d74b 13License: Apache v2.0
c851376d 14Group: Libraries/Python
da43f606
JB
15#Source0Download: https://pypi.python.org/simple/cython/
16Source0: https://pypi.python.org/packages/c6/fe/97319581905de40f1be7015a0ea1bd336a756f6249914b148a17eefa75dc/%{module}-%{version}.tar.gz
17# Source0-md5: 890b494a12951f1d6228c416a5789554
4194a06e 18URL: http://cython.org/
aff1366a 19BuildRequires: rpmbuild(macros) >= 1.710
50da0181 20%if %{with python2}
28c9083d
JB
21BuildRequires: python >= 1:2.6
22BuildRequires: python-devel >= 1:2.6
e44bbaad 23BuildRequires: python-setuptools
50da0181
JB
24%endif
25%if %{with python3}
28c9083d
JB
26BuildRequires: python3 >= 1:3.2
27BuildRequires: python3-2to3 >= 1:3.2
28BuildRequires: python3-devel >= 1:3.2
28c9083d 29BuildRequires: python3-modules >= 1:3.2
e44bbaad 30BuildRequires: python3-setuptools
50da0181 31%endif
c851376d 32BuildRequires: rpm-pythonprov
28c9083d 33Requires: python-devel >= 1:2.6
c851376d 34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define _noautocompressdoc *.c
37
38%description
39Cython lets you write code that mixes Python and C data types any way
6f08c5d3 40you want, and compiles it into a C extension for Python. Cython is
41based on Pyrex.
c851376d 42
50da0181
JB
43This package contains Cython module for Python 2.x.
44
c851376d 45%description -l pl.UTF-8
e752d74b 46Cython pozwala pisać kod zawierający dane Pythona i języka C połączone
c851376d 47w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
6f08c5d3 48Cython jest oparty na Pyreksie.
c851376d 49
50da0181
JB
50Ten pakiet zawiera moduł Cython dla Pythona 2.x.
51
52%package -n python3-Cython
53Summary: Language for writing Python Extension Modules (Python 3.x version)
54Summary(pl.UTF-8): Język służący do pisania modułów rozszerzających Pythona (wersja dla Pythona 3.x)
55Group: Libraries/Python
28c9083d 56Requires: python3-devel >= 1:3.2
50da0181
JB
57
58%description -n python3-Cython
59Cython lets you write code that mixes Python and C data types any way
60you want, and compiles it into a C extension for Python. Cython is
61based on Pyrex.
62
63This package contains Cython module for Python 3.x.
64
65%description -n python3-Cython -l pl.UTF-8
66Pyrex pozwala pisać kod zawierający dane Pythona i języka C połączone
67w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
68Cython jest oparty na Pyreksie.
69
70Ten pakiet zawiera moduł Cython dla Pythona 3.x.
71
c851376d 72%package examples
e752d74b
JB
73Summary: Examples for Cython language
74Summary(pl.UTF-8): Przykłady programów w języku Cython
c851376d 75Group: Libraries/Python
50da0181 76Obsoletes: python3-Cython-examples
c851376d 77
78%description examples
e752d74b 79This package contains example programs for Cython language.
c851376d 80
81%description examples -l pl.UTF-8
e752d74b 82Pakiet zawierający przykładowe programy napisane w języku Cython.
c851376d 83
84%prep
85%setup -q -n %{module}-%{version}
86
7f7a7361 87%build
50da0181 88%if %{with python2}
ed9929e1 89%py_build
50da0181
JB
90%endif
91
92%if %{with python3}
ed9929e1 93%py3_build
50da0181 94%endif
7f7a7361 95
c851376d 96%install
97rm -rf $RPM_BUILD_ROOT
98install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99
50da0181 100%if %{with python3}
ed9929e1 101%py3_install
50da0181
JB
102
103%{__mv} $RPM_BUILD_ROOT%{_bindir}/cython{,3}
28c9083d 104%{__mv} $RPM_BUILD_ROOT%{_bindir}/cythonize{,3}
50da0181
JB
105%{__mv} $RPM_BUILD_ROOT%{_bindir}/cygdb{,3}
106%endif
107
108%if %{with python2}
ed9929e1 109%py_install
c851376d 110
f7af39b5 111find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -a ! -name 'Lexicon.py' -exec rm -f {} \;
50da0181 112%endif
c851376d 113
114cp -a Demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
50da0181 119%if %{with python2}
c851376d 120%files
121%defattr(644,root,root,755)
e752d74b 122%doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
f7af39b5 123%attr(755,root,root) %{_bindir}/cython
28c9083d 124%attr(755,root,root) %{_bindir}/cythonize
52da8e1d 125%attr(755,root,root) %{_bindir}/cygdb
81b5c351 126%{py_sitedir}/cython.py[co]
f7af39b5 127%{py_sitedir}/Cython
128%{py_sitedir}/pyximport
50da0181
JB
129%{py_sitedir}/Cython-%{version}-py*.egg-info
130%endif
131
132%if %{with python3}
133%files -n python3-Cython
134%defattr(644,root,root,755)
135%doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
136%attr(755,root,root) %{_bindir}/cython3
28c9083d 137%attr(755,root,root) %{_bindir}/cythonize3
50da0181
JB
138%attr(755,root,root) %{_bindir}/cygdb3
139%{py3_sitedir}/cython.py
140%{py3_sitedir}/__pycache__/cython.*
141%{py3_sitedir}/Cython
142%{py3_sitedir}/pyximport
143%{py3_sitedir}/Cython-%{version}-py*.egg-info
144%endif
c851376d 145
146%files examples
147%defattr(644,root,root,755)
148%{_examplesdir}/%{name}-%{version}
This page took 0.141149 seconds and 4 git commands to generate.