# Template file for 'python-jupyter_nbconvert'
pkgname=python-jupyter_nbconvert
version=4.3.0
revision=1
noarch=yes
wrksrc="nbconvert-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-mistune python-Jinja2 python-Pygments python-traitlets
 python-jupyter_core python-jupyter_nbformat python-entrypoints"
pycompile_module="nbconvert"
short_desc="Converting Jupyter notebooks (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/jupyter/nbconvert"
license="3-clause-BSD"
distfiles="${PYPI_SITE}/n/nbconvert/nbconvert-${version}.tar.gz"
checksum=d967ec588ffd1ad7336163f1ac8957a348b5c4bce4465632db4cf684ffe4b718
alternatives="jupyter-nbconvert:jupyter-nbconvert:/usr/bin/jupyter-nbconvert2"

post_install() {
	vlicense COPYING.md LICENSE
}

python3-jupyter_nbconvert_package() {
	noarch=yes
	depends="python3-mistune python3-Jinja2 python3-Pygments python3-traitlets
	 python3-jupyter_core python3-jupyter_nbformat python3-entrypoints"
	pycompile_module="nbconvert"
	replaces="python3.4-jupyter_nbconvert>=0"
	short_desc="${short_desc/Python2/Python3}"
	alternatives="jupyter-nbconvert:jupyter-nbconvert:/usr/bin/jupyter-nbconvert3"
	pkg_install() {
		vmove usr/bin/jupyter-nbconvert3
		vmove usr/lib/python3*
		vlicense COPYING.md LICENSE
	}
}
python3.4-jupyter_nbconvert_package() {
	noarch=yes
	build_style=meta
	short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
	depends="python3-jupyter_nbconvert>=${version}_${revision}"
}
