summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp A2016-09-07 21:59:39 +0200
committerPhilipp A2016-09-07 21:59:39 +0200
commitd79fb9f39feb8da13a3962bd21b4c34cb289ab7d (patch)
tree97b61103d0e671d15fe86e17fbeae0d4688250be
downloadaur-d79fb9f39feb8da13a3962bd21b4c34cb289ab7d.tar.gz
initial commit
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD42
2 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f5d03ad1fcae
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = jupyter_contrib_nbextensions
+ pkgdesc = A collection of Jupyter nbextensions
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://github.com/ipython-contrib/jupyter_contrib_nbextensions
+ arch = any
+ license = BSD
+ makedepends = python-pip
+ depends = python
+ depends = jupyter
+ depends = jupyter-notebook
+ depends = jupyter-nbconvert
+ depends = jupyter_contrib_core
+ depends = jupyter_nbextensions_configurator
+ depends = python-yaml
+ depends = python-psutil
+ conflicts = jupyter-nbextensions
+ conflicts = python-jupyter-nbextensions
+ replaces = jupyter-nbextensions-git
+ replaces = jupyter-nbextensions
+ noextract = jupyter_contrib_nbextensions-0.1.0-py2.py3-none-any.whl
+ source = https://files.pythonhosted.org/packages/py2.py3/j/jupyter_contrib_nbextensions/jupyter_contrib_nbextensions-0.1.0-py2.py3-none-any.whl
+ source = user-default.patch::https://github.com/ipython-contrib/jupyter_contrib_nbextensions/commit/416df7776dbe3426ee83229c2a71f2783a73093f.patch
+ md5sums = f63f7add76a34ced5cf0b0dbb30f171a
+ md5sums = f81458a7304ba821831b65ee41395efd
+
+pkgname = jupyter_contrib_nbextensions
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9873c9dd971c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Philipp A. <flying-sheep@web.de>
+pkgname=jupyter_contrib_nbextensions
+pkgver=0.1.0
+pkgrel=1
+pkgdesc='A collection of Jupyter nbextensions'
+arch=(any)
+url="https://github.com/ipython-contrib/$pkgname"
+license=(BSD)
+replaces=(jupyter-nbextensions-git jupyter-nbextensions)
+conflicts=(jupyter-nbextensions python-jupyter-nbextensions)
+depends=(python jupyter jupyter-notebook jupyter-nbconvert jupyter_contrib_core jupyter_nbextensions_configurator python-yaml python-psutil)
+makedepends=(python-pip)
+_wheel="$pkgname-$pkgver-py2.py3-none-any.whl"
+source=("https://files.pythonhosted.org/packages/py2.py3/${pkgname::1}/$pkgname/$_wheel"
+ user-default.patch::"$url/commit/416df7776dbe3426ee83229c2a71f2783a73093f.patch")
+md5sums=('f63f7add76a34ced5cf0b0dbb30f171a'
+ 'f81458a7304ba821831b65ee41395efd')
+noextract=("$_wheel")
+
+package() {
+ local _python3="$(readlink /usr/bin/python3)"
+ local _site_packages="$pkgdir/usr/lib/$_python3/site-packages"
+
+ msg2 'installing python package'
+ pip install --compile --no-deps --ignore-installed --root="$pkgdir" "$_wheel"
+
+ patch -d "$_site_packages" -i "$srcdir/user-default.patch" -p2
+
+ msg2 'installing extensions'
+ #--user uses JUPYTER_CONFIG_DIR
+ env \
+ PATH="$pkgdir/usr/bin:$PATH" \
+ PYTHONPATH="$_site_packages:$PYTHONPATH" \
+ JUPYTER_DATA_DIR="$pkgdir/usr/share/jupyter" \
+ JUPYTER_CONFIG_DIR="$pkgdir/etc/jupyter" \
+ jupyter contrib nbextension install --user
+
+ #--fixed-strings --recursive --files-with-matches
+ for file in $(grep -Frl "$pkgdir" "$pkgdir/etc"); do
+ replace "$pkgdir/" '' -- $file
+ done
+}