diff options
author | goekce | 2020-12-18 09:26:41 +0100 |
---|---|---|
committer | goekce | 2020-12-18 09:26:41 +0100 |
commit | 03621d3439ba3dbd34271c65935ff176dd9964e0 (patch) | |
tree | 227665990db8f91dbd014c4bcffd9835cdbf9764 | |
download | aur-03621d3439ba3dbd34271c65935ff176dd9964e0.tar.gz |
initial
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | python-ipycanvas.install | 21 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ccf63ff24d16 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = python-ipycanvas-git + pkgdesc = Interactive widgets library exposing the browser's Canvas API + pkgver = r297.0cc98b4 + pkgrel = 1 + url = https://github.com/martinRenou/ipycanvas + install = python-ipycanvas.install + arch = any + license = BSD + makedepends = python-setuptools + makedepends = git + depends = python + depends = python-setuptools + depends = python-ipywidgets + depends = python-pillow + depends = python-numpy + depends = python-orjson + provides = python-ipycanvas + source = git+https://github.com/martinRenou/ipycanvas + md5sums = SKIP + +pkgname = python-ipycanvas-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..83f07147168c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: leuko <leuko_aydos_de> +_py=ipycanvas +pkgname=python-$_py-git +provides=("${pkgname%-git}") +pkgver=r297.0cc98b4 +pkgrel=1 +pkgdesc="Interactive widgets library exposing the browser's Canvas API" +arch=(any) +url="https://github.com/martinRenou/ipycanvas" +license=(BSD) +depends=( + python + python-setuptools + python-ipywidgets + python-pillow + python-numpy + python-orjson +) +makedepends=(python-setuptools git) +source=("git+$url") +md5sums=('SKIP') +pkgver() { + cd $_py + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +build() { + cd $_py + python setup.py build +} +package() { + cd $_py + python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build + install -Dm644 $(find LICENSE*|head -1) "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} +install=${pkgname%-git}.install diff --git a/python-ipycanvas.install b/python-ipycanvas.install new file mode 100644 index 000000000000..c0db25a7326f --- /dev/null +++ b/python-ipycanvas.install @@ -0,0 +1,21 @@ +post_install() { + echo 'Installing the extension in Jupyterlab:' + jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas + echo 'Installing and enabling the extension in Jupyter notebook (tree):' + jupyter nbextension install --system --py ipycanvas + jupyter nbextension enable --system --py ipycanvas + echo 'Please restart the Jupyter servers to load the new extension' +} + +pre_remove() { + echo 'Uninstalling the extension in Jupyterlab:' + jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager ipycanvas + echo 'Uninstalling and disabling the extension in Jupyter notebook (tree):' + jupyter nbextension disable --system --py ipycanvas + jupyter nbextension uninstall --system --py ipycanvas +} + +post_upgrade() { + pre_remove + post_install +} |