summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry-Joseph Audéoud2022-11-15 10:58:58 +0100
committerHenry-Joseph Audéoud2022-11-15 10:58:58 +0100
commit31a3d0b41222088e07b1024cc5eeb8276acfc653 (patch)
treec5a4427d5b73d6596ea328bddfe050dd304eb441
parent9e2a58113bb22368f3e17a5e2b3d7608b6164537 (diff)
downloadaur-jupyter-nbextension-hide-code.tar.gz
upgpkg: jupyter-nbextension-hide-code 0.7.0-1
upstream release Also use PEP 517 to build package.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD34
2 files changed, 28 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 770df7a7da44..94b9cc9e5808 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = jupyter-nbextension-hide-code
pkgdesc = Code, prompt and output hiding for Jupyter/IPython notebooks.
- pkgver = 0.6.0
+ pkgver = 0.7.0
pkgrel = 1
url = https://github.com/kirbs-/hide_code
arch = any
license = MIT
- makedepends = python-setuptools
- depends = python
- depends = jupyter-notebook
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-poetry
+ depends = python>=3.7
+ depends = jupyter-notebook>=6.0
+ depends = jupyter-nbconvert>=6
depends = python-pdfkit
depends = wkhtmltopdf
conflicts = python-rise
- source = hide_code.tar.gz::https://github.com/kirbs-/hide_code/archive/v0.6.0.tar.gz
- sha256sums = 860b68b4484d165d1f8133824ea7152f0c7db2828e61b9d31426433ae38a9e06
+ source = jupyter-nbextension-hide-code-0.7.0.tar.gz::https://github.com/kirbs-/hide_code/archive/v0.7.0.tar.gz
+ sha256sums = 46e7606ae01fc677a1b402520838be82539b368ea9257e0eefe4bd6855b83530
pkgname = jupyter-nbextension-hide-code
-
diff --git a/PKGBUILD b/PKGBUILD
index d2584ddc6f1c..0f7aec8b4b87 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,31 +3,35 @@
pkgname=jupyter-nbextension-hide-code
_name="${pkgname#jupyter-nbextension-}"
_name="${_name//-/_}"
-pkgver=0.6.0
+pkgver=0.7.0
pkgrel=1
pkgdesc="Code, prompt and output hiding for Jupyter/IPython notebooks."
arch=(any)
url="https://github.com/kirbs-/hide_code"
license=('MIT')
conflicts=('python-rise')
-depends=('python' 'jupyter-notebook' 'python-pdfkit' 'wkhtmltopdf')
-makedepends=('python-setuptools')
-source=("${_name}.tar.gz::https://github.com/kirbs-/${_name}/archive/v${pkgver}.tar.gz")
-sha256sums=('860b68b4484d165d1f8133824ea7152f0c7db2828e61b9d31426433ae38a9e06')
+depends=('python>=3.7' 'jupyter-notebook>=6.0' 'jupyter-nbconvert>=6' python-pdfkit wkhtmltopdf)
+makedepends=(python-build python-installer python-poetry)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kirbs-/${_name}/archive/v${pkgver}.tar.gz")
+sha256sums=('46e7606ae01fc677a1b402520838be82539b368ea9257e0eefe4bd6855b83530') # Official
-package() {
- cd "$srcdir/hide_code-$pkgver" || return
- python setup.py install --root="$pkgdir/" --optimize=1
+build() {
+ cd "${_name}-${pkgver}"
+ python -m build --wheel --no-isolation
+}
+package() {
+ cd "${_name}-${pkgver}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ # Jupyter specific
(
- local _python3="$(readlink /usr/bin/python3)"
- local _site_packages="$pkgdir/usr/lib/$_python3/site-packages"
- export PYTHONPATH="$_site_packages:$PYTHONPATH"
- export JUPYTER_PATH="$pkgdir/usr/"
- jupyter-nbextension install --py --prefix="$pkgdir/usr/" "${_name}"
-# jupyter-nbextension enable --py --prefix="$pkgdir/usr/" "${_name}"
-# jupyter-serverextension enable --py --prefix="$pkgdir/usr/" "${_name}"
+ local site_packages="${pkgdir}$(python -c "import site; print(site.getsitepackages()[0])")"
+ export PYTHONPATH="${site_packages}:${PYTHONPATH}"
+ export JUPYTER_PATH="${pkgdir}/usr/"
+ jupyter-nbextension install --py --prefix="${pkgdir}/usr/" "${_name}"
+# jupyter-nbextension enable --py --prefix="${pkgdir}/usr/" "${_name}"
+# jupyter-serverextension enable --py --prefix="${pkgdir}/usr/" "${_name}"
)
}