python-jupyter_notebook: use alternatives

This commit is contained in:
Alessio Sergi 2016-05-29 23:23:22 +02:00
parent d756e97d8b
commit 8c57adcb90

View file

@ -1,7 +1,7 @@
# Template file for 'python-jupyter_notebook'
pkgname=python-jupyter_notebook
version=4.2.0
revision=1
revision=2
noarch=yes
replaces="python-ipython-notebook>=0"
wrksrc="notebook-${version}"
@ -20,14 +20,12 @@ license="3-clause-BSD"
distfiles="${PYPI_SITE}/n/notebook/notebook-${version}.tar.gz"
checksum=e10c4916c77b48394796b5b1440d61d7b210f9941194048fe20ef88948016d84
post_install() {
rm -f ${DESTDIR}/usr/bin/*
for f in jupyter-nbextension jupyter-notebook; do
vbin build-2.7/scripts-2.7/${f}
vbin build-3.4/scripts-3.4/${f} ${f}3.4
done
vlicense COPYING.md LICENSE
alternatives="
jupyter-notebook:jupyter-notebook:/usr/bin/jupyter-notebook2.7
jupyter-notebook:jupyter-nbextension:/usr/bin/jupyter-nbextension2.7"
post_install() {
vlicense COPYING.md LICENSE
# use system mathjax
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/notebook/static/components/MathJax
for pyver in $python_versions; do
@ -37,6 +35,9 @@ post_install() {
}
python3.4-jupyter_notebook_package() {
alternatives="
jupyter-notebook:jupyter-notebook:/usr/bin/jupyter-notebook3.4
jupyter-notebook:jupyter-nbextension:/usr/bin/jupyter-nbextension3.4"
noarch=yes
replaces="python3.4-ipython-notebook>=0"
depends="python3.4-Jinja2 python3.4-terminado python3.4-tornado