49 lines
1.8 KiB
Bash
Executable File
49 lines
1.8 KiB
Bash
Executable File
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
|
|
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
|
|
|
|
pkgname=python-numpy
|
|
pkgver=2.2.1
|
|
pkgrel=2
|
|
pkgdesc="Scientific tools for Python"
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
license=('custom')
|
|
url="https://www.numpy.org/"
|
|
depends=('cblas' 'lapack' 'python')
|
|
optdepends=('blas-openblas: faster linear algebra')
|
|
makedepends=('python-build' 'python-installer' 'meson-python' 'cmake' 'gcc-fortran' 'cython')
|
|
checkdepends=('python-pytest' 'python-hypothesis')
|
|
source=("https://github.com/numpy/numpy/releases/download/v$pkgver/numpy-$pkgver.tar.gz")
|
|
sha512sums=('15876635bd2b26a0f511472c447ff95102f3016eea02e5117d7f5a1ae4782cd656c10706e8b2e00adee0920a7673f216056fb842700d634fbb5630b672f26ddf')
|
|
|
|
build() {
|
|
cd numpy-$pkgver
|
|
CFLAGS+=" -ffat-lto-objects" \
|
|
CXXFLAGS+=" -ffat-lto-objects" \
|
|
python -m build --wheel --no-isolation \
|
|
-Csetup-args="-Dblas=cblas" \
|
|
-Csetup-args="-Dlapack=lapack"
|
|
}
|
|
|
|
check() {
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
|
|
cd numpy-$pkgver
|
|
python -m installer --destdir="$PWD/tmp_install" dist/*.whl
|
|
cd "$PWD/tmp_install"
|
|
PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/$site_packages:$PYTHONPATH" python -c 'import numpy; numpy.test()'
|
|
}
|
|
|
|
package() {
|
|
cd numpy-$pkgver
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
# Symlink license file
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
ln -s "$site_packages"/numpy-$pkgver.dist-info/LICENSE.txt \
|
|
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
|
|
}
|