From 0eaf65a0d0e7f8412ec653709336782bd6ffce35 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 23 Sep 2023 21:01:03 -0400 Subject: [PATCH] python3-numpy: rebuild for Python 3.12 --- srcpkgs/python3-numpy/template | 35 +++++++++------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/srcpkgs/python3-numpy/template b/srcpkgs/python3-numpy/template index 086debc2a24..e9806e90987 100644 --- a/srcpkgs/python3-numpy/template +++ b/srcpkgs/python3-numpy/template @@ -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 }