# Template file for 'python3-jupyter_nbconvert'
pkgname=python3-jupyter_nbconvert
version=7.16.4
revision=2
build_style=python3-pep517
hostmakedepends="hatchling"
depends="python3-BeautifulSoup4 python3-bleach python3-defusedxml
 python3-Jinja2 python3-jupyter_core python3-jupyterlab_pygments
 python3-MarkupSafe python3-mistune python3-nbclient
 python3-jupyter_nbformat python3-packaging python3-pandocfilters
 python3-tinycss2"
checkdepends="$depends python3-pytest python3-jupyter_ipywidgets
 asciidoc inkscape pandoc python3-flaky python3-PyQt5"
short_desc="Converting Jupyter notebooks"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="BSD-3-Clause"
homepage="https://github.com/jupyter/nbconvert"
changelog="https://raw.githubusercontent.com/jupyter/nbconvert/main/CHANGELOG.md"
distfiles="${PYPI_SITE}/n/nbconvert/nbconvert-${version}.tar.gz"
checksum=86ca91ba266b0a448dc96fa6c5b9d98affabde2867b363258703536807f9f7f4

pre_check() {
	# templates must be in $JUPYTER_DATA_DIR/nbconvert/templates
	# but they are in ${wrksrc}/share/templates
	# fix with a symlink  share/nbconvert -> share/.
	[ -d share/nbconvert ] || ln -s . share/nbconvert
	make_check_pre="env JUPYTER_DATA_DIR=${wrksrc}/share"
}

post_install() {
	vlicense LICENSE
}
