- python3 does not build anymore, rel 4
[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_with     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:        4
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:  cblas-devel
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.714
24 BuildRequires:  swig-python >= 2.0.4
25 %if %{with python2}
26 BuildRequires:  python-devel >= 1:2.5
27 BuildRequires:  python-numpy-devel
28 BuildRequires:  python-setuptools
29 %if %{with tests}
30 BuildRequires:  python-nose
31 BuildRequires:  python-scipy >= 1.0.0
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-devel >= 1:3.2
36 BuildRequires:  python3-numpy-devel
37 BuildRequires:  python3-setuptools
38 %if %{with tests}
39 BuildRequires:  python3-nose
40 BuildRequires:  python3-scipy >= 1.0.0
41 %endif
42 %endif
43 Requires:       python-modules >= 1:2.5
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 scikit-umfpack provides wrapper of UMFPACK sparse direct solver to
48 SciPy.
49
50 %description -l pl.UTF-8
51 scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania
52 problemów na macierzach rzadkich dla SciPy.
53
54 %package -n python3-scikit-umfpack
55 Summary:        Wrapper of UMFPACK sparse direct solver to SciPy
56 Summary(pl.UTF-8):      Obudowanie procedur UMFPACK do rozwiązywania problemów na macierzach rzadkich dla SciPy
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.2
59
60 %description -n python3-scikit-umfpack
61 scikit-umfpack provides wrapper of UMFPACK sparse direct solver to
62 SciPy.
63
64 %description -n python3-scikit-umfpack -l pl.UTF-8
65 scikit-umfpack to obudowanie procedur UMFPACK do rozwiązywania
66 problemów na macierzach rzadkich dla SciPy.
67
68 %prep
69 %setup -q -n scikit-umfpack-%{version}
70
71 %build
72 export BLAS=%{_libdir}
73 export UMFPACK=%{_libdir}
74 export CFLAGS="%{rpmcflags} -I/usr/include/umfpack"
75
76 %if %{with python2}
77 %py_build
78
79 %if %{with tests}
80 PYTHONPATH=$(readlink -f build-2/lib.*)/scikits/umfpack \
81 nosetests-%{py_ver} scikits
82 %endif
83 find scikits -name '*.pyc' -exec rm -f {} \;
84 %endif
85
86 %if %{with python3}
87 %py3_build
88
89 %if %{with tests}
90 PYTHONPATH=$(readlink -f build-3/lib.*)/scikits/umfpack \
91 nosetests-%{py3_ver} scikits
92 %endif
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 export BLAS=%{_libdir}
99 export UMFPACK=%{_libdir}
100
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
123 rm -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.091216 seconds and 3 git commands to generate.