]>
Commit | Line | Data |
---|---|---|
3112f01a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Wrapper of UMFPACK sparse direct solver to SciPy | |
8 | Summary(pl.UTF-8): Obudowanie procedur UMFPACK do rozwiązywania problemów na macierzach rzadkich dla SciPy | |
9 | Name: python-scikit-umfpack | |
10 | Version: 0.3.2 | |
50372056 | 11 | Release: 2 |
3112f01a JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/scikit-umfpack/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/s/scikit-umfpack/scikit-umfpack-%{version}.tar.gz | |
16 | # Source0-md5: a92e3b8b7c864a9d5b25bf3d1a7ca39c | |
17 | URL: https://pypi.org/project/scikit-umfpack/ | |
18 | BuildRequires: AMD-devel | |
19 | BuildRequires: UMFPACK-devel | |
20 | BuildRequires: blas-devel | |
21 | BuildRequires: rpm-pythonprov | |
22 | BuildRequires: rpmbuild(macros) >= 1.714 | |
23 | BuildRequires: swig-python >= 2.0.4 | |
24 | %if %{with python2} | |
25 | BuildRequires: python-devel >= 1:2.5 | |
26 | BuildRequires: python-numpy-devel | |
27 | BuildRequires: python-setuptools | |
28 | %if %{with tests} | |
dd9241ca | 29 | BuildRequires: python-nose |
3112f01a JB |
30 | BuildRequires: python-scipy >= 1.0.0 |
31 | %endif | |
32 | %endif | |
33 | %if %{with python3} | |
34 | BuildRequires: python3-devel >= 1:3.2 | |
35 | BuildRequires: python3-numpy-devel | |
36 | BuildRequires: python3-setuptools | |
37 | %if %{with tests} | |
dd9241ca | 38 | BuildRequires: python3-nose |
3112f01a JB |
39 | BuildRequires: python3-scipy >= 1.0.0 |
40 | %endif | |
41 | %endif | |
42 | Requires: python-modules >= 1:2.5 | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | scikit-umfpack provides wrapper of UMFPACK sparse direct solver to | |
47 | SciPy. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania | |
51 | problemów na macierzach rzadkich dla SciPy. | |
52 | ||
53 | %package -n python3-scikit-umfpack | |
54 | Summary: Wrapper of UMFPACK sparse direct solver to SciPy | |
55 | Summary(pl.UTF-8): Obudowanie procedur UMFPACK do rozwiązywania problemów na macierzach rzadkich dla SciPy | |
56 | Group: Libraries/Python | |
57 | Requires: python3-modules >= 1:3.2 | |
58 | ||
59 | %description -n python3-scikit-umfpack | |
60 | scikit-umfpack provides wrapper of UMFPACK sparse direct solver to | |
61 | SciPy. | |
62 | ||
63 | %description -n python3-scikit-umfpack -l pl.UTF-8 | |
64 | scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania | |
65 | problemów na macierzach rzadkich dla SciPy. | |
66 | ||
67 | %prep | |
68 | %setup -q -n scikit-umfpack-%{version} | |
69 | ||
70 | %build | |
71 | export BLAS=%{_libdir} | |
72 | export UMFPACK=%{_libdir} | |
73 | ||
74 | %if %{with python2} | |
75 | %py_build %{?with_tests:test} | |
76 | ||
77 | %if %{with tests} | |
78 | PYTHONPATH=$(readlink -f build-2/lib.*) \ | |
79 | nosetests-%{py_ver} scikits | |
80 | %endif | |
81 | %endif | |
82 | ||
83 | %if %{with python3} | |
84 | %py3_build %{?with_tests:test} | |
85 | ||
86 | %if %{with tests} | |
87 | PYTHONPATH=$(readlink -f build-3/lib.*) \ | |
88 | nosetests-%{py3_ver} scikits | |
89 | %endif | |
90 | %endif | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
f85e5201 JB |
95 | export BLAS=%{_libdir} |
96 | export UMFPACK=%{_libdir} | |
97 | ||
3112f01a JB |
98 | %if %{with python2} |
99 | %py_install | |
100 | # ensure scikits/__init__.py is compiled | |
101 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
102 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
103 | ||
104 | %py_postclean | |
105 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/MANIFEST.in | |
106 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/scikits/umfpack/tests | |
107 | %endif | |
108 | ||
109 | %if %{with python3} | |
110 | %py3_install | |
111 | # ensure scikits/__init__.py is compiled | |
112 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
113 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
114 | ||
115 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/MANIFEST.in | |
116 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/scikits/umfpack/tests | |
117 | %endif | |
118 | ||
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %if %{with python2} | |
123 | %files | |
124 | %defattr(644,root,root,755) | |
125 | %doc LICENSE README.rst | |
126 | %dir %{py_sitedir}/scikits | |
127 | %{py_sitedir}/scikits/__init__.py[co] | |
128 | %dir %{py_sitedir}/scikits/umfpack | |
129 | %attr(755,root,root) %{py_sitedir}/scikits/umfpack/__umfpack.so | |
130 | %{py_sitedir}/scikits/umfpack/*.py[co] | |
131 | %{py_sitedir}/scikit_umfpack-%{version}-py*.egg-info | |
132 | %endif | |
133 | ||
134 | %if %{with python3} | |
135 | %files -n python3-scikit-umfpack | |
136 | %defattr(644,root,root,755) | |
137 | %doc LICENSE README.rst | |
138 | %dir %{py3_sitedir}/scikits | |
139 | %{py3_sitedir}/scikits/__init__.py | |
140 | %dir %{py3_sitedir}/scikits/__pycache__ | |
141 | %{py3_sitedir}/scikits/__pycache__/__init__.cpython-*.py[co] | |
142 | %dir %{py3_sitedir}/scikits/umfpack | |
143 | %attr(755,root,root) %{py3_sitedir}/scikits/umfpack/__umfpack.cpython-*.so | |
144 | %{py3_sitedir}/scikits/umfpack/*.py | |
145 | %{py3_sitedir}/scikits/umfpack/__pycache__ | |
146 | %{py3_sitedir}/scikit_umfpack-%{version}-py*.egg-info | |
147 | %endif |