numpy/numpy.spec

134 lines
4.0 KiB
RPMSpec
Raw Normal View History

2019-11-19 11:51:13 +08:00
%global modname numpy
Name: numpy
2021-07-16 15:02:47 +08:00
Version: 1.20.1
Release: 1
2019-11-19 11:51:13 +08:00
Epoch: 1
Summary: A fast multidimensional array facility for Python
2021-07-16 15:02:47 +08:00
License: ASL 2.0
2019-11-19 11:51:13 +08:00
URL: http://www.numpy.org/
2021-07-16 15:02:47 +08:00
Source0: https://files.pythonhosted.org/packages/d2/48/f445be426ccd9b2fb64155ac6730c7212358882e589cd3717477d739d9ff/numpy-1.20.1.zip
2019-11-19 11:51:13 +08:00
BuildRequires: openblas-devel
2021-07-16 15:02:47 +08:00
BuildRequires: lapack-devel gcc-gfortran
BuildRequires: python3-Cython >= 0.29.21
2019-11-19 11:51:13 +08:00
%description
NumPy is the fundamental package for scientific computing with Python. It contains among other things:
a powerful N-dimensional array object
sophisticated (broadcasting) functions
tools for integrating C/C++ and Fortran code
useful linear algebra, Fourier transform, and random number capabilities
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.
%package -n python3-numpy
Summary: A fast multidimensional array facility for Python
License: BSD
%{?python_provide:%python_provide python3-numpy}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
Provides: python3-numpy-doc
%description -n python3-numpy
NumPy is the fundamental package for scientific computing with Python. It contains among other things:
a powerful N-dimensional array object
sophisticated (broadcasting) functions
tools for integrating C/C++ and Fortran code
useful linear algebra, Fourier transform, and random number capabilities
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.
%package -n python3-numpy-f2py
Summary: f2py for numpy
Requires: python3-numpy = %{epoch}:%{version}-%{release}
Requires: python3-devel
Provides: python3-f2py = %{version}-%{release}
%{?python_provide:%python_provide python3-numpy-f2py}
%description -n python3-numpy-f2py
This package includes a version of f2py that works properly with NumPy.
%prep
%autosetup -n %{name}-%{version} -p1
rm numpy/distutils/command/__init__.py && touch numpy/distutils/command/__init__.py
cat >> site.cfg <<EOF
[openblas]
library_dirs = %{_libdir}
openblas_libs = openblasp
EOF
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
pushd %{py3dir}
env OPENBLAS=%{_libdir} \
BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py build
popd
%install
env OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py install --root %{buildroot}
pushd %{buildroot}%{_bindir} &> /dev/null
%check
pushd doc &> /dev/null
PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 \
%{__python3} -c "import pkg_resources, numpy ; numpy.test(verbose=2)"
popd &> /dev/null
%files -n python3-numpy
%license LICENSE.txt
%doc THANKS.txt site.cfg.example
%dir %{python3_sitearch}/%{name}
2021-07-16 15:02:47 +08:00
%{python3_sitearch}/%{name}/*
2019-11-19 11:51:13 +08:00
%{python3_sitearch}/%{name}-*.egg-info
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
%files -n python3-numpy-f2py
2020-10-30 09:48:39 +08:00
%{_bindir}/f2py
2019-11-19 11:51:13 +08:00
%{_bindir}/f2py3
%{_bindir}/f2py3.*
2019-11-19 11:51:13 +08:00
%{python3_sitearch}/%{name}/f2py
2020-10-30 09:48:39 +08:00
2019-11-19 11:51:13 +08:00
%changelog
2021-07-16 15:02:47 +08:00
* Thu Jul 15 2021 liksh<liks11@chinaunicom.cn> - 1.20.1-1
- update to 1.20.1
2021-01-18 16:36:44 +08:00
* Mon Jan 18 2021 tianwei<tianwei12@huawei.com> - 1.16.5-6
- Type:NA
- ID:N/A
- SUGA:NA
- DESC:fix package files
2020-10-30 09:48:39 +08:00
* Fri Oct 30 2020 tianwei<tianwei12@huawei.com> - 1.16.5-5
- Type:NA
- ID:N/A
- SUGA:NA
- DESC:remove python2
2020-09-22 16:51:27 +08:00
* Tue Sep 22 2020 shixuantong<shixuantong> - 1.16.5-4
- Type:NA
- ID:N/A
- SUGA:NA
- DESC:remove python-nose
* Sat Jun 20 2020 fuyangqing<fuyangqing@huawei.com> - 1.16.5-3
- Type:bugfix
- ID:N/A
- SUGA:NA
- DESC:change spec hardcode the dependent python version number
2019-11-19 11:51:13 +08:00
* Tue Oct 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.16.5-1
- Package init