Repository navigation
Expand file tree
/
Copy pathpython3-Cython.spec
More file actions
143 lines (116 loc) · 3.93 KB
/
Copy pathpython3-Cython.spec
File metadata and controls
143 lines (116 loc) · 3.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# Conditional build:
%bcond_without apidocs # Sphinx documentation
%bcond_with tests # test suite (SLOOOOW)
%define module Cython
Summary: Language for writing Python Extension Modules
Summary(pl.UTF-8): Język służący do pisania modułów rozszerzających Pythona
Name: python3-%{module}
Version: 3.3.1
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/cython/
Source0: https://files.pythonhosted.org/packages/source/c/cython/cython-%{version}.tar.gz
# Source0-md5: 9e5b3106f42ced6d0d8b22e66e796bfe
URL: https://cython.org/
BuildRequires: python3 >= 1:3.9
BuildRequires: python3-devel >= 1:3.9
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-interpreters-pep-734
BuildRequires: python3-ipython
BuildRequires: python3-line_profiler
BuildRequires: python3-pytest
%endif
BuildRequires: rpm-build >= 4.6
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
%if %{with apidocs}
BuildRequires: python3-sphinx_clarity_theme
BuildRequires: python3-sphinx_issues >= 5.0.1
BuildRequires: python3-sphinx_tabs >= 3.4.4
BuildRequires: sphinx-pdg-3 >= 7.2.6
%endif
Requires: python3-devel >= 1:3.9
Conflicts: python-Cython < 3.0.11-3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautocompressdoc *.c
%description
Cython lets you write code that mixes Python and C data types any way
you want, and compiles it into a C extension for Python. Cython is
based on Pyrex.
This package contains Cython module for Python 3.x.
%description -l pl.UTF-8
Cython pozwala pisać kod zawierający dane Pythona i języka C połączone
w jakikolwiek sposób i kompiluje to jako rozszerzenie C dla Pythona.
Cython jest oparty na Pyreksie.
Ten pakiet zawiera moduł Cython dla Pythona 3.x.
%package apidocs
Summary: API documentation for Cython module
Summary(pl.UTF-8): Dokumentacja API modułu Cython
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for Cython module.
%description apidocs -l pl.UTF-8
Dokumentacja API modułu Cython.
%package examples
Summary: Examples for Cython language
Summary(pl.UTF-8): Przykłady programów w języku Cython
Group: Libraries/Python
BuildArch: noarch
%description examples
This package contains example programs for Cython language.
%description examples -l pl.UTF-8
Pakiet zawierający przykładowe programy napisane w języku Cython.
%prep
%setup -q -n cython-%{version}
%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' Demos/benchmarks/bm_unpack_sequence.py
%build
%py3_build
%if %{with tests}
%{__python3} runtests.py \
SPHINXBUILD=sphinx-build-3
%endif
%if %{with apidocs}
%{__make} -C docs html \
SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%py3_install
%{__mv} $RPM_BUILD_ROOT%{_bindir}/cython{,3}
%{__mv} $RPM_BUILD_ROOT%{_bindir}/cythonize{,3}
%{__mv} $RPM_BUILD_ROOT%{_bindir}/cygdb{,3}
%{__ln_s} cython3 $RPM_BUILD_ROOT%{_bindir}/cython
%{__ln_s} cythonize3 $RPM_BUILD_ROOT%{_bindir}/cythonize
%{__ln_s} cygdb3 $RPM_BUILD_ROOT%{_bindir}/cygdb
cp -a Demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/benchmarks/bm_unpack_sequence.py
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES.rst COPYING.txt README.rst ToDo.txt USAGE.txt
%attr(755,root,root) %{_bindir}/cygdb3
%attr(755,root,root) %{_bindir}/cython3
%attr(755,root,root) %{_bindir}/cythonize3
%{_bindir}/cygdb
%{_bindir}/cython
%{_bindir}/cythonize
%{py3_sitedir}/cython.py
%{py3_sitedir}/__pycache__/cython.*
%{py3_sitedir}/Cython
%{py3_sitedir}/pyximport
%{py3_sitedir}/Cython-%{version}-py*.egg-info
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%doc docs/build/html/{_images,_static,src,*.html,*.js}
%endif
%files examples
%defattr(644,root,root,755)
%{_examplesdir}/%{name}-%{version}