Files
void-packages/srcpkgs/python3-numpy/template
Andrew J. Hesford 23b1f238bc python3-numpy: update to 1.19.5, fix armv5tel-musl
In fenv.h, musl disables the normal set of constants that you would get
on arm with an arm device with an fpu (armv6 and up), but armv5tel on
void uses softfloat all the time. But python3-numpy dosen't use these to
interact with the fpu (the compiler would generate those instructions)
and rather just uses those constants for a generic GCC implementation.
So we give them out anyway.

Co-authored-by: fosslinux <fosslinux@aussies.space>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
2021-01-06 11:07:38 -05:00

46 lines
1.2 KiB
Bash

# Template file for 'python3-numpy'
pkgname=python3-numpy
version=1.19.5
revision=1
wrksrc="numpy-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython gcc-fortran"
makedepends="python3-devel lapack-devel cblas-devel"
depends="python3-setuptools"
short_desc="Fast and sophisticated array facility to Python3"
maintainer="bra1nwave <bra1nwave@protonmail.com>"
license="BSD-3-Clause"
homepage="https://www.numpy.org/"
distfiles="https://github.com/numpy/numpy/archive/v${version}.tar.gz"
checksum=43fe3bcdf27a2eb27196a1d140385aeece71c8b1a6eda18d2c6365239e50c60f
alternatives="numpy:f2py:/usr/bin/f2py3"
post_patch() {
case "${XBPS_TARGET_MACHINE}" in
armv5tel-musl)
cp "${FILESDIR}/fenv-constants.h" numpy/core/src/npymath/
patch -Np0 -i "${FILESDIR}/fenv-constants.patch"
;;
esac
}
pre_build() {
make_build_args+=" ${makejobs}"
}
do_check() {
echo "Skipping check: tests do not function properly in builddir"
}
post_install() {
# create compat symlinks for .h files
vmkdir ${py3_inc}
ln -sfr ${DESTDIR}/${py3_sitelib}/numpy/core/include/numpy \
${DESTDIR}/${py3_inc}
rm -f ${DESTDIR}/usr/bin/f2py
rm -f ${DESTDIR}/usr/lib/python*/site-packages/numpy/LICENSE.txt
vlicense LICENSE.txt LICENSE
}