4 %bcond_with doc # Sphinx documentation
5 %bcond_with tests # unit tests (missing in sdist)
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: Ahead of Time compiler for numeric kernels
10 Summary(pl.UTF-8): Kompilator z wyprzedzeniem dla jąder numerycznych
12 # keep 0.9.5 here for python 2 support
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/pythran/
18 Source0: https://files.pythonhosted.org/packages/source/p/pythran/pythran-%{version}.tar.gz
19 # Source0-md5: da6cbfd2d5b278e41f359db347f6620b
20 URL: https://pypi.org/project/pythran/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-pytest-runner
24 BuildRequires: python-setuptools >= 1:12.0.5
26 BuildRequires: python-beniget >= 0.2.0
27 BuildRequires: python-decorator
28 BuildRequires: python-gast >= 0.3.0
29 BuildRequires: python-networkx >= 2
30 BuildRequires: python-numpy
31 BuildRequires: python-ply >= 3.4
32 BuildRequires: python-six
36 BuildRequires: python3-modules >= 1:3.2
37 BuildRequires: python3-pytest-runner
38 BuildRequires: python3-setuptools >= 1:12.0.5
40 BuildRequires: python3-beniget >= 0.2.0
41 BuildRequires: python3-decorator
42 BuildRequires: python3-gast >= 0.3.0
43 BuildRequires: python3-networkx >= 2
44 BuildRequires: python3-numpy
45 BuildRequires: python3-ply >= 3.4
46 BuildRequires: python3-six
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.714
52 BuildRequires: python3-guzzle_sphinx_theme
53 BuildRequires: python3-nbsphinx
54 BuildRequires: python3-numpy
55 BuildRequires: python3-scipy
56 BuildRequires: sphinx-pdg-3
58 Requires: python-modules >= 1:2.7
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Pythran is an ahead of time compiler for a subset of the Python
64 language, with a focus on scientific computing. It takes a Python
65 module annotated with a few interface description and turns it into a
66 native Python module with the same interface, but (hopefully) faster.
68 %description -l pl.UTF-8
69 Pythran to kompilator z wyprzedzeniem dla podzbioru języka Python,
70 skupiający się na obliczeniach naukowych. Przyjmuje moduł Pythona z
71 niewielkim opisem interfejsu i zamienia go na natywny moduł Pythona o
72 tym samym interfejsie, ale (miejmy nadzieję) szybszy.
74 %package -n python3-pythran
75 Summary: Ahead of Time compiler for numeric kernels
76 Summary(pl.UTF-8): Kompilator z wyprzedzeniem dla jąder numerycznych
77 Group: Libraries/Python
78 Requires: python3-modules >= 1:3.2
80 %description -n python3-pythran
81 Pythran is an ahead of time compiler for a subset of the Python
82 language, with a focus on scientific computing. It takes a Python
83 module annotated with a few interface description and turns it into a
84 native Python module with the same interface, but (hopefully) faster.
86 %description -n python3-pythran -l pl.UTF-8
87 Pythran to kompilator z wyprzedzeniem dla podzbioru języka Python,
88 skupiający się na obliczeniach naukowych. Przyjmuje moduł Pythona z
89 niewielkim opisem interfejsu i zamienia go na natywny moduł Pythona o
90 tym samym interfejsie, ale (miejmy nadzieję) szybszy.
93 Summary: API documentation for Python pythran module
94 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pythran
98 API documentation for Python pythran module.
100 %description apidocs -l pl.UTF-8
101 Dokumentacja API modułu Pythona pythran.
104 %setup -q -n pythran-%{version}
108 %py_build %{?with_tests:test}
112 %py3_build %{?with_tests:test}
116 %{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
121 rm -rf $RPM_BUILD_ROOT
126 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran{,-2}
127 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran-config{,-2}
135 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran{,-3}
136 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran-config{,-3}
137 ln -sf pythran-3 $RPM_BUILD_ROOT%{_bindir}/pythran
138 ln -sf pythran-config-3 $RPM_BUILD_ROOT%{_bindir}/pythran-config
142 rm -rf $RPM_BUILD_ROOT
146 %defattr(644,root,root,755)
147 %doc LICENSE README.rst
148 %attr(755,root,root) %{_bindir}/pythran-2
149 %attr(755,root,root) %{_bindir}/pythran-config-2
150 %{py_sitescriptdir}/omp
151 %{py_sitescriptdir}/pythran
152 %{py_sitescriptdir}/pythran-%{version}-py*.egg-info
156 %files -n python3-pythran
157 %defattr(644,root,root,755)
158 %doc LICENSE README.rst
159 %attr(755,root,root) %{_bindir}/pythran
160 %attr(755,root,root) %{_bindir}/pythran-3
161 %attr(755,root,root) %{_bindir}/pythran-config
162 %attr(755,root,root) %{_bindir}/pythran-config-3
163 %{py3_sitescriptdir}/omp
164 %{py3_sitescriptdir}/pythran
165 %{py3_sitescriptdir}/pythran-%{version}-py*.egg-info
170 %defattr(644,root,root,755)
171 %doc docs/_build/html/*