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