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