- tests require nose
[packages/python-scikit-umfpack.git] / python-scikit-umfpack.spec
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-nose
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}
38 BuildRequires:  python3-nose
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
95 %if %{with python2}
96 %py_install
97 # ensure scikits/__init__.py is compiled
98 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
99 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
100
101 %py_postclean
102 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/MANIFEST.in
103 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/scikits/umfpack/tests
104 %endif
105
106 %if %{with python3}
107 %py3_install
108 # ensure scikits/__init__.py is compiled
109 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
110 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
111
112 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/MANIFEST.in
113 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/scikits/umfpack/tests
114 %endif
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %files
121 %defattr(644,root,root,755)
122 %doc LICENSE README.rst
123 %dir %{py_sitedir}/scikits
124 %{py_sitedir}/scikits/__init__.py[co]
125 %dir %{py_sitedir}/scikits/umfpack
126 %attr(755,root,root) %{py_sitedir}/scikits/umfpack/__umfpack.so
127 %{py_sitedir}/scikits/umfpack/*.py[co]
128 %{py_sitedir}/scikit_umfpack-%{version}-py*.egg-info
129 %endif
130
131 %if %{with python3}
132 %files -n python3-scikit-umfpack
133 %defattr(644,root,root,755)
134 %doc LICENSE README.rst
135 %dir %{py3_sitedir}/scikits
136 %{py3_sitedir}/scikits/__init__.py
137 %dir %{py3_sitedir}/scikits/__pycache__
138 %{py3_sitedir}/scikits/__pycache__/__init__.cpython-*.py[co]
139 %dir %{py3_sitedir}/scikits/umfpack
140 %attr(755,root,root) %{py3_sitedir}/scikits/umfpack/__umfpack.cpython-*.so
141 %{py3_sitedir}/scikits/umfpack/*.py
142 %{py3_sitedir}/scikits/umfpack/__pycache__
143 %{py3_sitedir}/scikit_umfpack-%{version}-py*.egg-info
144 %endif
This page took 0.100372 seconds and 3 git commands to generate.