void-packages/srcpkgs/python-jupyter_notebook/template

66 lines
2.4 KiB
Bash

# Template file for 'python-jupyter_notebook'
pkgname=python-jupyter_notebook
version=5.0.0
revision=1
noarch=yes
wrksrc="notebook-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-Jinja2 python-terminado python-tornado
python-ipython_genutils python-traitlets python-jupyter_core
python-jupyter_client python-jupyter_nbformat python-jupyter_nbconvert
python-ipython_ipykernel mathjax"
pycompile_module="notebook"
short_desc="Jupyter interactive notebook (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/jupyter/notebook"
license="3-clause-BSD"
distfiles="${PYPI_SITE}/n/notebook/notebook-${version}.tar.gz"
checksum=1cea3bbbd03c8e5842a1403347a8cc8134486b3ce081a2e5b1952a00ea66ed54
alternatives="
jupyter-notebook:jupyter-notebook:/usr/bin/jupyter-notebook2
jupyter-notebook:jupyter-nbextension:/usr/bin/jupyter-nbextension2
jupyter-notebook:jupyter-serverextension:/usr/bin/jupyter-serverextension2
jupyter-notebook:jupyter-bundlerextension:/usr/bin/jupyter-bundlerextension2"
pre_build() {
# remove less-watch script
rm -f scripts/less-watch
}
post_install() {
vlicense COPYING.md LICENSE
# use system mathjax
for py_sitelib in $py2_sitelib $py3_sitelib; do
rm -rf ${DESTDIR}/${py_sitelib}/notebook/static/components/MathJax
ln -sf /usr/share/mathjax ${DESTDIR}/${py_sitelib}/notebook/static/components/MathJax
done
}
python3-jupyter_notebook_package() {
alternatives="
jupyter-notebook:jupyter-notebook:/usr/bin/jupyter-notebook3
jupyter-notebook:jupyter-nbextension:/usr/bin/jupyter-nbextension3
jupyter-notebook:jupyter-serverextension:/usr/bin/jupyter-serverextension3
jupyter-notebook:jupyter-bundlerextension:/usr/bin/jupyter-bundlerextension3"
noarch=yes
replaces="python3.4-jupyter_notebook>=0"
depends="python3-Jinja2 python3-terminado python3-tornado
python3-ipython_genutils python3-traitlets python3-jupyter_core
python3-jupyter_client python3-jupyter_nbformat python3-jupyter_nbconvert
python3-ipython_ipykernel mathjax"
pycompile_module="notebook"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
vlicense COPYING.md LICENSE
}
}
python3.4-jupyter_notebook_package() {
noarch=yes
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-jupyter_notebook>=${version}_${revision}"
}