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