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