# Template file for 'python3-cypari2'
pkgname=python3-cypari2
version=2.2.4
revision=2
build_style=python3-pep517
build_helper="meson qemu"
hostmakedepends="python3-meson-python python3-Cython
 python3-cysignals pari perl"
makedepends="python3-devel pari-devel gmp-devel"
depends="python3-cysignals"
checkdepends="${depends} python3-pytest"
short_desc="Python interface to the number theory library PARI/GP"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/sagemath/cypari2"
changelog="https://github.com/sagemath/cypari2/releases"
distfiles="https://github.com/sagemath/cypari2/archive/refs/tags/${version}.tar.gz"
checksum=346fa1c44dbd13fd52baf30c79582c690456e7cb43499ff8d4b9f26d7dcdff6c

do_check() {
	local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
	python3 -m installer --destdir "${testdir}" \
		${make_install_args} ${make_install_target:-dist/*.whl}

	# Please do not disable this custom check;
	# This will run many more tests than just running pytest
	PYTHONPATH="${testdir}/${py3_sitelib}" make check
}
