diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 34 |
2 files changed, 28 insertions, 22 deletions
@@ -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 - @@ -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}" ) } |