]>
Commit | Line | Data |
---|---|---|
3a26a2ba JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
c7bc85b9 JB |
5 | %define module numpy |
6 | Summary: Python 3.x numerical facilities | |
7 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 3.x | |
8 | Name: python3-%{module} | |
98e4d49d | 9 | Version: 1.22.2 |
44d7a3a0 | 10 | Release: 3 |
c7bc85b9 JB |
11 | Epoch: 1 |
12 | License: BSD | |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://github.com/numpy/numpy/releases/ | |
15 | Source0: https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz | |
98e4d49d | 16 | # Source0-md5: 5b506b01ef454f39272ca75de1c7f61c |
fda4872c | 17 | Patch0: %{name}-deprecated.patch |
982d6a3c | 18 | URL: https://github.com/numpy/numpy |
22d6751b JB |
19 | %if "%(test -w /dev/shm ; echo $?)" != "0" |
20 | BuildRequires: WRITABLE(/dev/shm) | |
21 | %endif | |
c7bc85b9 JB |
22 | BuildRequires: gcc-fortran |
23 | BuildRequires: lapack-devel >= 3.1.1-2 | |
982d6a3c | 24 | BuildRequires: python3-Cython >= 0.29.24 |
930e1f7b | 25 | BuildRequires: python3-devel >= 1:3.6 |
c7bc85b9 | 26 | BuildRequires: python3-setuptools |
3a26a2ba JB |
27 | %if %{with tests} |
28 | BuildRequires: python3-pytest | |
29 | %endif | |
c7bc85b9 JB |
30 | BuildRequires: rpm-pythonprov |
31 | BuildRequires: rpmbuild(macros) >= 1.714 | |
930e1f7b | 32 | Requires: python3-libs >= 1:3.6 |
c7bc85b9 JB |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | NumPy is a collection of extension modules to provide high-performance | |
37 | multidimensional numeric arrays to the Python programming language. | |
38 | ||
39 | This package contains Python 3 modules. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia | |
43 | numeryczne na macierzach wielowymiarowych w języku Python. | |
44 | ||
45 | Ten pakiet zawiera moduły Pythona 3. | |
46 | ||
47 | %package devel | |
48 | Summary: C header files for Python 3 numerical modules | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 3 | |
50 | Group: Development/Languages/Python | |
98e4d49d | 51 | %pyrequires_eq python3-devel |
c7bc85b9 JB |
52 | Requires: %{name} = %{epoch}:%{version}-%{release} |
53 | ||
54 | %description devel | |
55 | C header files for Python 3 numerical modules. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe języka C modułów numerycznych Pythona 3. | |
59 | ||
60 | %package -n f2py3 | |
61 | Summary: Fortran to Python 3 interface generator | |
62 | Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3 | |
63 | Group: Libraries/Python | |
64 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
65 | ||
66 | %description -n f2py3 | |
67 | Fortran to Python 3 interface generator. | |
68 | ||
69 | %description -n f2py3 -l pl.UTF-8 | |
70 | Generator interfejsów z Fortranu do Pythona 3. | |
71 | ||
72 | %prep | |
73 | %setup -q -n %{module}-%{version} | |
fda4872c | 74 | %patch0 -p1 |
c7bc85b9 JB |
75 | |
76 | %build | |
77 | # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements, | |
78 | # instead of appending proper options (like -fPIC/-shared resp.) | |
79 | CFLAGS="%{rpmcflags} -fPIC" | |
80 | LDFLAGS="%{rpmldflags} -shared" | |
81 | ||
82 | %py3_build | |
83 | ||
3a26a2ba | 84 | %if %{with tests} |
b87c3f92 | 85 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
3a26a2ba JB |
86 | %{__python3} runtests.py --mode=full |
87 | %endif | |
88 | ||
c7bc85b9 JB |
89 | %install |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %py3_install | |
93 | ||
94 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc | |
95 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/random/_examples | |
96 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/tests | |
97 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests | |
98 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/LICENSE.txt | |
99 | ||
100 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c | |
101 | ||
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %doc LICENSE.txt THANKS.txt | |
108 | %dir %{py3_sitedir}/%{module} | |
109 | %{py3_sitedir}/%{module}/*.py | |
982d6a3c JR |
110 | %{py3_sitedir}/%{module}/*.pyi |
111 | %{py3_sitedir}/%{module}/py.typed | |
c7bc85b9 | 112 | %{py3_sitedir}/%{module}/__pycache__ |
98e4d49d MK |
113 | %dir %{py3_sitedir}/%{module}/array_api |
114 | %{py3_sitedir}/%{module}/array_api/*.py | |
115 | %{py3_sitedir}/%{module}/array_api/__pycache__ | |
c7bc85b9 JB |
116 | %dir %{py3_sitedir}/%{module}/compat |
117 | %{py3_sitedir}/%{module}/compat/*.py | |
118 | %{py3_sitedir}/%{module}/compat/__pycache__ | |
119 | %dir %{py3_sitedir}/%{module}/core | |
120 | %{py3_sitedir}/%{module}/core/*.py | |
982d6a3c | 121 | %{py3_sitedir}/%{module}/core/*.pyi |
c7bc85b9 JB |
122 | %{py3_sitedir}/%{module}/core/__pycache__ |
123 | %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so | |
124 | %dir %{py3_sitedir}/%{module}/distutils | |
125 | %{py3_sitedir}/%{module}/distutils/*.py | |
982d6a3c | 126 | %{py3_sitedir}/%{module}/distutils/*.pyi |
c7bc85b9 | 127 | %{py3_sitedir}/%{module}/distutils/__pycache__ |
56ec9c09 | 128 | %{py3_sitedir}/%{module}/distutils/checks |
c7bc85b9 JB |
129 | %dir %{py3_sitedir}/%{module}/distutils/command |
130 | %{py3_sitedir}/%{module}/distutils/command/*.py | |
131 | %{py3_sitedir}/%{module}/distutils/command/__pycache__ | |
132 | %dir %{py3_sitedir}/%{module}/distutils/fcompiler | |
133 | %{py3_sitedir}/%{module}/distutils/fcompiler/*.py | |
134 | %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ | |
135 | %dir %{py3_sitedir}/%{module}/fft | |
136 | %{py3_sitedir}/%{module}/fft/*.py | |
982d6a3c | 137 | %{py3_sitedir}/%{module}/fft/*.pyi |
c7bc85b9 JB |
138 | %{py3_sitedir}/%{module}/fft/__pycache__ |
139 | %attr(755,root,root) %{py3_sitedir}/%{module}/fft/_pocketfft_internal.cpython-3*.so | |
140 | %dir %{py3_sitedir}/%{module}/lib | |
141 | %{py3_sitedir}/%{module}/lib/*.py | |
982d6a3c | 142 | %{py3_sitedir}/%{module}/lib/*.pyi |
c7bc85b9 JB |
143 | %{py3_sitedir}/%{module}/lib/__pycache__ |
144 | %dir %{py3_sitedir}/%{module}/linalg | |
145 | %{py3_sitedir}/%{module}/linalg/*.py | |
982d6a3c | 146 | %{py3_sitedir}/%{module}/linalg/*.pyi |
c7bc85b9 JB |
147 | %{py3_sitedir}/%{module}/linalg/__pycache__ |
148 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so | |
149 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so | |
150 | %dir %{py3_sitedir}/%{module}/ma | |
151 | %{py3_sitedir}/%{module}/ma/*.py | |
982d6a3c | 152 | %{py3_sitedir}/%{module}/ma/*.pyi |
c7bc85b9 JB |
153 | %{py3_sitedir}/%{module}/ma/__pycache__ |
154 | %dir %{py3_sitedir}/%{module}/matrixlib | |
155 | %{py3_sitedir}/%{module}/matrixlib/*.py | |
982d6a3c | 156 | %{py3_sitedir}/%{module}/matrixlib/*.pyi |
c7bc85b9 JB |
157 | %{py3_sitedir}/%{module}/matrixlib/__pycache__ |
158 | %dir %{py3_sitedir}/%{module}/polynomial | |
159 | %{py3_sitedir}/%{module}/polynomial/*.py | |
982d6a3c | 160 | %{py3_sitedir}/%{module}/polynomial/*.pyi |
c7bc85b9 JB |
161 | %{py3_sitedir}/%{module}/polynomial/__pycache__ |
162 | %dir %{py3_sitedir}/%{module}/random | |
163 | %{py3_sitedir}/%{module}/random/*.py | |
982d6a3c | 164 | %{py3_sitedir}/%{module}/random/*.pyi |
c7bc85b9 JB |
165 | %{py3_sitedir}/%{module}/random/__pycache__ |
166 | %attr(755,root,root) %{py3_sitedir}/%{module}/random/*.cpython-3*.so | |
167 | %dir %{py3_sitedir}/%{module}/testing | |
168 | %{py3_sitedir}/%{module}/testing/_private | |
169 | %{py3_sitedir}/%{module}/testing/*.py | |
982d6a3c | 170 | %{py3_sitedir}/%{module}/testing/*.pyi |
c7bc85b9 | 171 | %{py3_sitedir}/%{module}/testing/__pycache__ |
982d6a3c JR |
172 | %dir %{py3_sitedir}/%{module}/typing |
173 | %{py3_sitedir}/%{module}/typing/*.py | |
174 | %{py3_sitedir}/%{module}/typing/*.pyi | |
175 | %{py3_sitedir}/%{module}/typing/__pycache__ | |
c7bc85b9 JB |
176 | %{py3_sitedir}/numpy-%{version}-py*.egg-info |
177 | ||
178 | %files devel | |
179 | %defattr(644,root,root,755) | |
930e1f7b | 180 | %{py3_sitedir}/%{module}/*.pxd |
c7bc85b9 JB |
181 | %{py3_sitedir}/%{module}/core/include |
182 | %{py3_sitedir}/%{module}/core/lib | |
183 | %{py3_sitedir}/%{module}/random/*.pxd | |
930e1f7b | 184 | %{py3_sitedir}/%{module}/random/lib |
c7bc85b9 JB |
185 | |
186 | %files -n f2py3 | |
187 | %defattr(644,root,root,755) | |
982d6a3c | 188 | %attr(755,root,root) %{_bindir}/f2py |
c7bc85b9 JB |
189 | %attr(755,root,root) %{_bindir}/f2py3 |
190 | %attr(755,root,root) %{_bindir}/f2py%{py3_ver} | |
191 | %dir %{py3_sitedir}/%{module}/f2py | |
192 | %{py3_sitedir}/%{module}/f2py/*.py | |
982d6a3c | 193 | %{py3_sitedir}/%{module}/f2py/*.pyi |
c7bc85b9 JB |
194 | %{py3_sitedir}/%{module}/f2py/__pycache__ |
195 | %{py3_sitedir}/%{module}/f2py/src |