# Template file for 'python3-ipython_ipykernel'
pkgname=python3-ipython_ipykernel
version=6.29.5
revision=3
build_style=python3-pep517
# run all tests available
make_check_target="tests"
hostmakedepends="hatchling python3-jupyter_client"
depends="python3-comm python3-ipython python3-jupyter_client
 python3-jupyter_core python3-matplotlib-inline python3-nest_asyncio
 python3-packaging python3-psutil python3-pyzmq python3-tornado
 python3-traitlets"
checkdepends="$depends python3-flaky python3-pytest-asyncio
 python3-pytest-timeout python3-trio python3-curio python3-matplotlib
 python3-PyQt5 python3-PyQt5-svg python3-pytest-xdist"
short_desc="IPython kernel for Jupyter"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="BSD-3-Clause"
homepage="https://github.com/ipython/ipykernel"
changelog="https://raw.githubusercontent.com/ipython/ipykernel/main/CHANGELOG.md"
distfiles="${PYPI_SITE}/i/ipykernel/ipykernel-${version}.tar.gz"
checksum=f093a22c4a40f8828f8e330a9c297cb93dcab13bd9678ded6de8e5cf81c56215

if [ "$XBPS_CHECK_PKGS" = full ]; then
	# this would cause a build-time circular dependency
	checkdepends+=" python3-ipyparallel"
else
	# These tests require ipyparallel
	make_check_args+="
	 --ignore tests/test_pickleutil.py
	 --deselect tests/test_ipkernel_direct.py::test_do_apply
	 "
fi

if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ] &&
	[ "$XBPS_TARGET_LIBC" = "musl" ]; then
	# Also fails "on Windows and MacOS Python 3.8+" so just disable it
	make_check_args+=" --deselect tests/test_kernel.py::test_subprocess_print"
fi

post_install() {
	vlicense LICENSE
}
