# $Id: PKGBUILD 164237 2012-07-28 03:14:33Z stephane $ # Maintainer: Vladimir Khodygo # Contributor: Ilya Elenskiy # Contributor: Jan de Groot # Contributor: Douglas Soares de Andrade # Contributor: Angel 'angvp' Velasquez # Adapted to mkl by Simone Riva pkgname=python-numpy-mkl pkgver=1.21.1 pkgrel=1 pkgdesc="Scientific tools for Python, compiled with Intel MKL" arch=('x86_64' 'i686') license=('custom') url="http://numpy.scipy.org/" provides=("python-numpy=$pkgver") conflicts=('python-numpy') depends=('python>=3.6' 'intel-mkl') optdepends=('python-nose: testsuite') makedepends=('python-setuptools' 'gcc-fortran' 'python-nose' 'cython>=0.29.21') checkdepends=('python-pytest' 'python-hypothesis') options=('staticlibs') source=("https://github.com/numpy/numpy/releases/download/v$pkgver/numpy-$pkgver.tar.gz") sha256sums=('504ced5d900fd5724c74ebf5dbb03572c04074bec9baa24b5646c66a2450e654') prepare() { export MKLROOT=/opt/intel/mkl # https://github.com/numpy/numpy/issues/17390 sed -i '/error/a \ ignore:Module already imported so cannot be rewritten' numpy-$pkgver/pytest.ini } build() { cd numpy-$pkgver python setup.py build } check() { # TODO: Fix fortran tests here (it works fine after installation) cd numpy-$pkgver python setup.py install --root="$PWD/tmp_install" --optimize=1 cd "$PWD/tmp_install" PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python3.9/site-packages:$PYTHONPATH" python -c 'import numpy; numpy.test()' } package() { cd numpy-$pkgver python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy" install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/" }