Skip to content

Commit

Permalink
fixup! python3-numpy: rebuild for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Oct 4, 2023
1 parent ac1bb2a commit dfa70f7
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions srcpkgs/python3-numpy/template
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
pkgname=python3-numpy
version=1.26.0
revision=2
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython gcc-fortran"
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"
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
}

0 comments on commit dfa70f7

Please sign in to comment.