summaryrefslogtreecommitdiff
path: root/packaging/python-numpy.spec
blob: fa4453a23552e6f66da14d803174e9322b96c822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Name:           python-numpy
Version:        1.15.0
Release:        0
Summary:        NumPy array processing for numbers, strings, records and objects
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Url:            http://www.numpy.org/
Source0:        %{name}-%{version}.tar.gz
Source1001:	%{name}.manifest
BuildRequires:  blas-devel
BuildRequires:  gcc-fortran
BuildRequires:  lapack-devel
BuildRequires:  unzip
BuildRequires:  python-cython
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  openblas-devel


%description
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type which also makes NumPy suitable for
interfacing with general-purpose data-base applications.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.


%package devel
Summary:        Development files for numpy applications
Group:          Development/Libraries/Python
Requires:       %{name} = %{version}
Requires:       blas-devel
BuildRequires:  gcc-fortran
Requires:       lapack-devel
Requires:       python-devel
Requires:       openblas-devel


%description devel
This package contains files for developing applications using numpy.


%prep
%setup -q
cp %{SOURCE1001} .


%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
/usr/bin/python2 setup.py build


%install
/usr/bin/python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}

# Remove testsuite from packaging
rm -rf %{buildroot}%{python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests

mkdir -p %{buildroot}%{_includedir}
pushd %{buildroot}%{_includedir}
ln -sf %{python_sitearch}/numpy/core/include/numpy numpy
popd

%post


%files
%manifest %{name}.manifest
%defattr(-,root,root)
%doc *.txt
%{_bindir}/f2py
%{_bindir}/f2py2
%{_bindir}/conv-template
%{_bindir}/from-template
%{python_sitearch}/numpy/
%{python_sitearch}/numpy-%{version}-py*.egg-info
%exclude %{python_sitearch}/numpy/*/*/*.c
%exclude %{python_sitearch}/numpy/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*/*.h
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
%license LICENSE.txt


%files devel
%defattr(-,root,root)
%doc README.md THANKS.txt
%{python_sitearch}/numpy/*/*/*.c
%{python_sitearch}/numpy/*/*.h
%{python_sitearch}/numpy/*/*/*.h
%{python_sitearch}/numpy/*/*/*/*.h
%{python_sitearch}/numpy/core/lib/libnpymath.a
%{_includedir}/numpy

%changelog