]> git.pld-linux.org Git - packages/python-Cython.git/blame_incremental - python-Cython.spec
- up to 0.25.2
[packages/python-Cython.git] / python-Cython.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module Cython
7
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)
10Name: python-%{module}
11Version: 0.25.2
12Release: 1
13License: Apache v2.0
14Group: Libraries/Python
15#Source0Download: https://pypi.python.org/simple/cython/
16Source0: https://pypi.python.org/packages/b7/67/7e2a817f9e9c773ee3995c1e15204f5d01c8da71882016cac10342ef031b/%{module}-%{version}.tar.gz
17# Source0-md5: 642c81285e1bb833b14ab3f439964086
18URL: http://cython.org/
19BuildRequires: rpmbuild(macros) >= 1.710
20%if %{with python2}
21BuildRequires: python >= 1:2.6
22BuildRequires: python-devel >= 1:2.6
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3 >= 1:3.2
27BuildRequires: python3-2to3 >= 1:3.2
28BuildRequires: python3-devel >= 1:3.2
29BuildRequires: python3-modules >= 1:3.2
30BuildRequires: python3-setuptools
31%endif
32BuildRequires: rpm-pythonprov
33Requires: python-devel >= 1:2.6
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
40you want, and compiles it into a C extension for Python. Cython is
41based on Pyrex.
42
43This package contains Cython module for Python 2.x.
44
45%description -l pl.UTF-8
46Cython pozwala pisać kod zawierający dane Pythona i języka C połączone
47w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
48Cython jest oparty na Pyreksie.
49
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
56Requires: python3-devel >= 1:3.2
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
72%package examples
73Summary: Examples for Cython language
74Summary(pl.UTF-8): Przykłady programów w języku Cython
75Group: Libraries/Python
76Obsoletes: python3-Cython-examples
77
78%description examples
79This package contains example programs for Cython language.
80
81%description examples -l pl.UTF-8
82Pakiet zawierający przykładowe programy napisane w języku Cython.
83
84%prep
85%setup -q -n %{module}-%{version}
86
87%build
88%if %{with python2}
89%py_build
90%endif
91
92%if %{with python3}
93%py3_build
94%endif
95
96%install
97rm -rf $RPM_BUILD_ROOT
98install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99
100%if %{with python3}
101%py3_install
102
103%{__mv} $RPM_BUILD_ROOT%{_bindir}/cython{,3}
104%{__mv} $RPM_BUILD_ROOT%{_bindir}/cythonize{,3}
105%{__mv} $RPM_BUILD_ROOT%{_bindir}/cygdb{,3}
106%endif
107
108%if %{with python2}
109%py_install
110
111find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -a ! -name 'Lexicon.py' -exec rm -f {} \;
112%endif
113
114cp -a Demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
119%if %{with python2}
120%files
121%defattr(644,root,root,755)
122%doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
123%attr(755,root,root) %{_bindir}/cython
124%attr(755,root,root) %{_bindir}/cythonize
125%attr(755,root,root) %{_bindir}/cygdb
126%{py_sitedir}/cython.py[co]
127%{py_sitedir}/Cython
128%{py_sitedir}/pyximport
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
137%attr(755,root,root) %{_bindir}/cythonize3
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
145
146%files examples
147%defattr(644,root,root,755)
148%{_examplesdir}/%{name}-%{version}
This page took 0.052039 seconds and 4 git commands to generate.