Lines 1-8
Link Here
|
1 |
%define _name Cython |
1 |
%define _name Cython |
2 |
|
2 |
|
|
|
3 |
%def_with python3 |
4 |
|
3 |
Name: python-module-%_name |
5 |
Name: python-module-%_name |
4 |
Version: 0.15.1 |
6 |
Version: 0.15.1 |
5 |
Release: alt1 |
7 |
Release: alt2 |
6 |
|
8 |
|
7 |
Summary: C-extensions for Python |
9 |
Summary: C-extensions for Python |
8 |
Group: Development/Python |
10 |
Group: Development/Python |
Lines 30-45
This makes Cython the ideal language for wrapping for external C
Link Here
|
30 |
libraries, and for fast C modules that speed up the execution of Python |
32 |
libraries, and for fast C modules that speed up the execution of Python |
31 |
code. |
33 |
code. |
32 |
|
34 |
|
|
|
35 |
%if_with python3 |
36 |
%package -n python3-module-%_name |
37 |
Summary: C-extensions for Python3 |
38 |
Group: Development/Python3 |
39 |
BuildRequires(pre): rpm-build-python3 |
40 |
BuildRequires: python3-devel python3-module-distribute |
41 |
|
42 |
%description -n python3-module-%_name |
43 |
Cython is a language that makes writing C extensions for the Python3 |
44 |
language as easy as Python3 itself. Cython is based on the well-known |
45 |
Pyrex, but supports more cutting edge functionality and optimizations. |
46 |
|
47 |
The Cython language is very close to the Python3 language, but Cython |
48 |
additionally supports calling C functions and declaring C types on |
49 |
variables and class attributes. This allows the compiler to generate |
50 |
very efficient C code from Cython code. |
51 |
|
52 |
This makes Cython the ideal language for wrapping for external C |
53 |
libraries, and for fast C modules that speed up the execution of Python3 |
54 |
code. |
55 |
%endif |
56 |
|
33 |
%prep |
57 |
%prep |
34 |
%setup -q -n %_name-%version |
58 |
%setup -q -n %_name-%version |
|
|
59 |
%if_with python3 |
60 |
rm -rf ../python3 |
61 |
cp -a . ../python3 |
62 |
%endif |
35 |
|
63 |
|
36 |
%build |
64 |
%build |
37 |
%__python setup.py build |
65 |
%python_build |
|
|
66 |
%if_with python3 |
67 |
pushd ../python3 |
68 |
%python3_build |
69 |
popd |
70 |
%endif |
38 |
|
71 |
|
39 |
%install |
72 |
%install |
40 |
CFLAGS="%optflags" %__python setup.py \ |
73 |
%if_with python3 |
41 |
install --optimize=2 \ |
74 |
pushd ../python3 |
42 |
--root=%buildroot |
75 |
%python3_install |
|
|
76 |
popd |
77 |
mv %buildroot/%_bindir/cython %buildroot/%_bindir/cython3 |
78 |
mv %buildroot/%_bindir/cygdb %buildroot/%_bindir/cygdb3 |
79 |
%endif |
80 |
|
81 |
%python_install |
43 |
|
82 |
|
44 |
%files |
83 |
%files |
45 |
%_bindir/cython |
84 |
%_bindir/cython |
Lines 55-61
install --optimize=2 \
Link Here
|
55 |
%exclude %python_sitelibdir/%_name/Debugger |
94 |
%exclude %python_sitelibdir/%_name/Debugger |
56 |
%exclude %_bindir/cygdb |
95 |
%exclude %_bindir/cygdb |
57 |
|
96 |
|
|
|
97 |
%if_with python3 |
98 |
%files -n python3-module-%_name |
99 |
%_bindir/cython3 |
100 |
%python3_sitelibdir/%_name/ |
101 |
%python3_sitelibdir/pyximport/ |
102 |
%python3_sitelibdir/cython.py |
103 |
%python3_sitelibdir/__pycache__/cython.* |
104 |
%python3_sitelibdir/*egg-info |
105 |
|
106 |
# don't package tests files and debugger |
107 |
%exclude %python3_sitelibdir/%_name/Tests |
108 |
%exclude %python3_sitelibdir/%_name/*/Tests |
109 |
%exclude %python3_sitelibdir/%_name/Debugger |
110 |
%exclude %_bindir/cygdb3 |
111 |
%endif |
112 |
|
58 |
%changelog |
113 |
%changelog |
|
|
114 |
* Thu Feb 09 2012 Vitaly Kuznetsov <vitty@altlinux.ru> 0.15.1-alt2 |
115 |
- Build with Python3 |
116 |
|
59 |
* Mon Dec 12 2011 Yuri N. Sedunov <aris@altlinux.org> 0.15.1-alt1 |
117 |
* Mon Dec 12 2011 Yuri N. Sedunov <aris@altlinux.org> 0.15.1-alt1 |
60 |
- 0.15.1 |
118 |
- 0.15.1 |
61 |
|
119 |
|
62 |
- |
|
|