]> git.pld-linux.org Git - packages/python-Cython.git/blob - python-Cython.spec
- release 2 (by relup.sh)
[packages/python-Cython.git] / python-Cython.spec
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
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}
11 Version:        0.23.4
12 Release:        2
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 Source0:        http://cython.org/release/%{module}-%{version}.tar.gz
16 # Source0-md5:  157df1f69bcec6b56fd97e0f2e057f6e
17 URL:            http://cython.org/
18 %if %{with python2}
19 BuildRequires:  python >= 1:2.6
20 BuildRequires:  python-devel >= 1:2.6
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
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
29 %endif
30 BuildRequires:  rpm-pythonprov
31 Requires:       python-devel >= 1:2.6
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _noautocompressdoc      *.c
35
36 %description
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
39 based on Pyrex.
40
41 This package contains Cython module for Python 2.x.
42
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.
47
48 Ten pakiet zawiera moduł Cython dla Pythona 2.x.
49
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
55
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
59 based on Pyrex.
60
61 This package contains Cython module for Python 3.x.
62
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.
67
68 Ten pakiet zawiera moduł Cython dla Pythona 3.x.
69
70 %package examples
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
75
76 %description examples
77 This package contains example programs for Cython language.
78
79 %description examples -l pl.UTF-8
80 Pakiet zawierający przykładowe programy napisane w języku Cython.
81
82 %prep
83 %setup -q -n %{module}-%{version}
84
85 %build
86 %if %{with python2}
87 %py_build \
88         --build-base build-2
89 %endif
90
91 %if %{with python3}
92 %py3_build \
93         --build-base build-3
94 %endif
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99
100 %if %{with python3}
101 %{__python3} setup.py \
102         build \
103                 --build-base build-3 \
104         install \
105                 --optimize=2 \
106                 --skip-build \
107                 --root=$RPM_BUILD_ROOT
108
109 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cython{,3}
110 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cythonize{,3}
111 %{__mv} $RPM_BUILD_ROOT%{_bindir}/cygdb{,3}
112 %endif
113
114 %if %{with python2}
115 %{__python} setup.py \
116         build \
117                 --build-base build-2 \
118         install \
119                 --optimize=2 \
120                 --skip-build \
121                 --root=$RPM_BUILD_ROOT
122
123 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -a ! -name 'Lexicon.py' -exec rm -f {} \;
124 %endif
125
126 cp -a Demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with python2}
132 %files
133 %defattr(644,root,root,755)
134 %doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
135 %attr(755,root,root) %{_bindir}/cython
136 %attr(755,root,root) %{_bindir}/cythonize
137 %attr(755,root,root) %{_bindir}/cygdb
138 %{py_sitedir}/cython.py[co]
139 %{py_sitedir}/Cython
140 %{py_sitedir}/pyximport
141 %{py_sitedir}/Cython-%{version}-py*.egg-info
142 %endif
143
144 %if %{with python3}
145 %files -n python3-Cython
146 %defattr(644,root,root,755)
147 %doc COPYING.txt README.txt ToDo.txt USAGE.txt Doc/*.html Doc/*.c
148 %attr(755,root,root) %{_bindir}/cython3
149 %attr(755,root,root) %{_bindir}/cythonize3
150 %attr(755,root,root) %{_bindir}/cygdb3
151 %{py3_sitedir}/cython.py
152 %{py3_sitedir}/__pycache__/cython.*
153 %{py3_sitedir}/Cython
154 %{py3_sitedir}/pyximport
155 %{py3_sitedir}/Cython-%{version}-py*.egg-info
156 %endif
157
158 %files examples
159 %defattr(644,root,root,755)
160 %{_examplesdir}/%{name}-%{version}
This page took 0.038653 seconds and 4 git commands to generate.