]>
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 | |
11 | Release: 1 | |
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} | |
29 | BuildRequires: python-scipy >= 1.0.0 | |
30 | %endif | |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-devel >= 1:3.2 | |
34 | BuildRequires: python3-numpy-devel | |
35 | BuildRequires: python3-setuptools | |
36 | %if %{with tests} | |
37 | BuildRequires: python3-scipy >= 1.0.0 | |
38 | %endif | |
39 | %endif | |
40 | Requires: python-modules >= 1:2.5 | |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %description | |
44 | scikit-umfpack provides wrapper of UMFPACK sparse direct solver to | |
45 | SciPy. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania | |
49 | problemów na macierzach rzadkich dla SciPy. | |
50 | ||
51 | %package -n python3-scikit-umfpack | |
52 | Summary: Wrapper of UMFPACK sparse direct solver to SciPy | |
53 | Summary(pl.UTF-8): Obudowanie procedur UMFPACK do rozwiązywania problemów na macierzach rzadkich dla SciPy | |
54 | Group: Libraries/Python | |
55 | Requires: python3-modules >= 1:3.2 | |
56 | ||
57 | %description -n python3-scikit-umfpack | |
58 | scikit-umfpack provides wrapper of UMFPACK sparse direct solver to | |
59 | SciPy. | |
60 | ||
61 | %description -n python3-scikit-umfpack -l pl.UTF-8 | |
62 | scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania | |
63 | problemów na macierzach rzadkich dla SciPy. | |
64 | ||
65 | %prep | |
66 | %setup -q -n scikit-umfpack-%{version} | |
67 | ||
68 | %build | |
69 | export BLAS=%{_libdir} | |
70 | export UMFPACK=%{_libdir} | |
71 | ||
72 | %if %{with python2} | |
73 | %py_build %{?with_tests:test} | |
74 | ||
75 | %if %{with tests} | |
76 | PYTHONPATH=$(readlink -f build-2/lib.*) \ | |
77 | nosetests-%{py_ver} scikits | |
78 | %endif | |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %py3_build %{?with_tests:test} | |
83 | ||
84 | %if %{with tests} | |
85 | PYTHONPATH=$(readlink -f build-3/lib.*) \ | |
86 | nosetests-%{py3_ver} scikits | |
87 | %endif | |
88 | %endif | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %if %{with python2} | |
94 | %py_install | |
95 | # ensure scikits/__init__.py is compiled | |
96 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
97 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
98 | ||
99 | %py_postclean | |
100 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/MANIFEST.in | |
101 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/scikits/umfpack/tests | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | # ensure scikits/__init__.py is compiled | |
107 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
108 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
109 | ||
110 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/MANIFEST.in | |
111 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/scikits/umfpack/tests | |
112 | %endif | |
113 | ||
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %if %{with python2} | |
118 | %files | |
119 | %defattr(644,root,root,755) | |
120 | %doc LICENSE README.rst | |
121 | %dir %{py_sitedir}/scikits | |
122 | %{py_sitedir}/scikits/__init__.py[co] | |
123 | %dir %{py_sitedir}/scikits/umfpack | |
124 | %attr(755,root,root) %{py_sitedir}/scikits/umfpack/__umfpack.so | |
125 | %{py_sitedir}/scikits/umfpack/*.py[co] | |
126 | %{py_sitedir}/scikit_umfpack-%{version}-py*.egg-info | |
127 | %endif | |
128 | ||
129 | %if %{with python3} | |
130 | %files -n python3-scikit-umfpack | |
131 | %defattr(644,root,root,755) | |
132 | %doc LICENSE README.rst | |
133 | %dir %{py3_sitedir}/scikits | |
134 | %{py3_sitedir}/scikits/__init__.py | |
135 | %dir %{py3_sitedir}/scikits/__pycache__ | |
136 | %{py3_sitedir}/scikits/__pycache__/__init__.cpython-*.py[co] | |
137 | %dir %{py3_sitedir}/scikits/umfpack | |
138 | %attr(755,root,root) %{py3_sitedir}/scikits/umfpack/__umfpack.cpython-*.so | |
139 | %{py3_sitedir}/scikits/umfpack/*.py | |
140 | %{py3_sitedir}/scikits/umfpack/__pycache__ | |
141 | %{py3_sitedir}/scikit_umfpack-%{version}-py*.egg-info | |
142 | %endif |