python3-numpy: rebuild for Python 3.12

This commit is contained in:
Andrew J. Hesford 2023-09-23 21:01:03 -04:00
parent fa2d44d2d4
commit 0eaf65a0d0

View file

@ -1,9 +1,14 @@
# Template file for 'python3-numpy'
pkgname=python3-numpy
version=1.26.0
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython gcc-fortran"
revision=2
build_style=python3-pep517
build_helper="meson qemu"
make_build_args="-Csetup-args=-Ddisable-svml=true
$(vopt_if openblas "" "-Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack")
"
hostmakedepends="python3-meson-python python3-pyproject-metadata
python3-setuptools pkg-config python3-Cython gcc-fortran"
makedepends="python3-devel
$(vopt_if openblas 'openblas-devel' 'lapack-devel cblas-devel')"
depends="python3"
@ -34,9 +39,6 @@ if [ "$build_option_openblas" ]; then
esac
fi
# SVML AVX-512 functions have very limited support; disble for now
export NPY_DISABLE_SVML=1
post_patch() {
case "${XBPS_TARGET_MACHINE}" in
armv5tel-musl)
@ -50,23 +52,6 @@ post_patch() {
fi
}
pre_build() {
# Build numpy in parallel
make_build_args+=" ${makejobs}"
# Find the right linear algebra subroutines on the target arch
: > site.cfg
for _blaslib in $(vopt_if openblas openblas "lapack blas"); do
cat >> site.cfg <<-EOF
[$_blaslib]
libraries = ${_blaslib}
include_dirs = ${XBPS_CROSS_BASE}/usr/include
library_dirs = ${XBPS_CROSS_BASE}/usr/lib
runtime_library_dirs = ${XBPS_CROSS_BASE}/usr/lib
EOF
done
}
do_check() {
local testjobs="-n $XBPS_MAKEJOBS"
local _skip
@ -93,8 +78,6 @@ do_check() {
}
post_install() {
rm ${DESTDIR}/usr/bin/f2py
rm ${DESTDIR}/${py3_sitelib}/numpy/LICENSE.txt
mv ${DESTDIR}/usr/bin/f2py{,3}
vlicense LICENSE.txt LICENSE
}