]> git.pld-linux.org Git - packages/python3-pythran.git/blob - python-pythran.spec
- new
[packages/python3-pythran.git] / python-pythran.spec
1 # TODO: finish docs
2 #
3 # Conditional build:
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
8
9 Summary:        Ahead of Time compiler for numeric kernels
10 Summary(pl.UTF-8):      Kompilator z wyprzedzeniem dla jąder numerycznych
11 Name:           python-pythran
12 # keep 0.9.5 here for python 2 support
13 Version:        0.9.5
14 Release:        1
15 License:        BSD
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-pytest-runner
24 BuildRequires:  python-setuptools >= 1:12.0.5
25 %if %{with tests}
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
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.2
37 BuildRequires:  python3-pytest-runner
38 BuildRequires:  python3-setuptools >= 1:12.0.5
39 %if %{with tests}
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
47 %endif
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 %if %{with doc}
52 BuildRequires:  python3-guzzle_sphinx_theme
53 BuildRequires:  python3-nbsphinx
54 BuildRequires:  python3-numpy
55 BuildRequires:  python3-scipy
56 BuildRequires:  sphinx-pdg-3
57 %endif
58 Requires:       python-modules >= 1:2.7
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
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.
67
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.
73
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
79
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.
85
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.
91
92 %package apidocs
93 Summary:        API documentation for Python pythran module
94 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pythran
95 Group:          Documentation
96
97 %description apidocs
98 API documentation for Python pythran module.
99
100 %description apidocs -l pl.UTF-8
101 Dokumentacja API modułu Pythona pythran.
102
103 %prep
104 %setup -q -n pythran-%{version}
105
106 %build
107 %if %{with python2}
108 %py_build %{?with_tests:test}
109 %endif
110
111 %if %{with python3}
112 %py3_build %{?with_tests:test}
113 %endif
114
115 %if %{with doc}
116 %{__make} -C docs html \
117         SPHINXBUILD=sphinx-build-3
118 %endif
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %if %{with python2}
124 %py_install
125
126 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran{,-2}
127 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pythran-config{,-2}
128
129 %py_postclean
130 %endif
131
132 %if %{with python3}
133 %py3_install
134
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
139 %endif
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %if %{with python2}
145 %files
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
153 %endif
154
155 %if %{with python3}
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
166 %endif
167
168 %if %{with doc}
169 %files apidocs
170 %defattr(644,root,root,755)
171 %doc docs/_build/html/*
172 %endif
This page took 0.097033 seconds and 3 git commands to generate.