* update python-numpy to 2.1.1-1

This commit is contained in:
Alexander Baldeck 2024-09-30 20:03:27 +02:00
parent 5a0ba8b2ae
commit 3acacf32c0
2 changed files with 34 additions and 12 deletions

View File

@ -0,0 +1,27 @@
pkgbase = python-numpy
pkgdesc = Scientific tools for Python
pkgver = 2.1.1
pkgrel = 1
url = https://www.numpy.org/
arch = x86_64
arch = powerpc64le
arch = powerpc64
arch = powerpc
arch = riscv64
license = custom
checkdepends = python-pytest
checkdepends = python-hypothesis
makedepends = python-build
makedepends = python-installer
makedepends = meson-python
makedepends = cmake
makedepends = gcc-fortran
makedepends = cython
depends = cblas
depends = lapack
depends = python
optdepends = blas-openblas: faster linear algebra
source = https://github.com/numpy/numpy/releases/download/v2.1.1/numpy-2.1.1.tar.gz
sha512sums = 94843f88a32cc1df3e572ac13f294e49201a1f50fbd28707a500839cdff61958823c5b8748a7a54cd866a1acc9bd11efde53042141a81cca44393ee7cee78cdc
pkgname = python-numpy

View File

@ -5,7 +5,7 @@
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
pkgname=python-numpy
pkgver=2.0.1
pkgver=2.1.1
pkgrel=1
pkgdesc="Scientific tools for Python"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
@ -16,19 +16,10 @@ 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=('4f638c17b44317b0000000b729726a5a4e9519af11d254b0e2daf32c6ff0cfdd56723a9cbee67c9145088f429f1f0cce79240f968211c2fb5ac08378e86dccfe')
sha512sums=('94843f88a32cc1df3e572ac13f294e49201a1f50fbd28707a500839cdff61958823c5b8748a7a54cd866a1acc9bd11efde53042141a81cca44393ee7cee78cdc')
build() {
cd numpy-$pkgver
# -mcpu etc interferes with numpy's own CPU detection and it'll provide
# runtime selection of featuresets
case "${CARCH}" in
powerpc64*)
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
;;
esac
CFLAGS+=" -ffat-lto-objects" \
CXXFLAGS+=" -ffat-lto-objects" \
python -m build --wheel --no-isolation \
@ -49,5 +40,9 @@ package() {
cd numpy-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/python-numpy/
# 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
}