summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAnthony Wang2023-10-17 15:14:31 +0000
committerAnthony Wang2023-10-17 15:14:31 +0000
commit28403ed2089cb7969ec981fb47dff92952b0ba63 (patch)
tree192b1a98c5a449d8a93c94ad918358be895e726f /PKGBUILD
parent4c8335dbd4016d4a8fe08c67945d61f14542dd6d (diff)
downloadaur-28403ed2089cb7969ec981fb47dff92952b0ba63.tar.gz
Use python-build and python-installer instead of unzipping whl
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 17 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 62888db5d726..6c97155e74b6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,26 @@
# Maintainer: Anthony Wang <a_at-exozy_dot-me>
-pkgbase='python-jupyter-server-proxy'
-pkgname=('python-jupyter-server-proxy')
-_name='jupyter-server_proxy'
+_name='jupyter-server-proxy'
+pkgname="python-$_name"
pkgver='4.1.0'
-pkgrel=1
-pkgdesc="Jupyter server extension to supervise and proxy web services"
+pkgrel=2
+pkgdesc="Jupyter notebook server extension to proxy web services"
url="https://github.com/jupyterhub/jupyter-server-proxy"
-depends=('python' 'python-aiohttp' 'python-simpervisor')
-makedepends=('unzip' 'python-setuptools')
+depends=(python python-aiohttp python-simpervisor)
+makedepends=(python-build python-installer python-hatch-jupyter-builder python-hatch-nodejs-version jupyterlab)
license=('BSD')
arch=('any')
-source=("https://files.pythonhosted.org/packages/py3/${_name::1}/$_name/${_name//-/_}-$pkgver-py3-none-any.whl")
-sha256sums=('3a417d6996e47a90ba5ec5dd2603887cfd2efbc4abf850a1a0fbe77e3b4d04e9')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/${_name//-/_}-$pkgver.tar.gz")
+sha256sums=('2cfac3b4232fe7144e8e60296b4f861708b4f13b29260a2cf28976bf8e617f70')
+
+build() {
+ cd "${_name//-/_}-$pkgver"
+ # Arch Linux's jupyerlab packaging is really bad and doesn't package the same dependencies as the PyPI version, so let's just --skip-dependency-check and hope for the best
+ python -m build --wheel --no-isolation --skip-dependency-check
+}
package() {
- local site="$pkgdir/usr/lib/$(readlink /bin/python3)/site-packages"
- install -d "$site"
- unzip "${_name//-/_}-$pkgver-py3-none-any.whl" -d "$site"
- mv "$site/${_name/-/_}-$pkgver.data/data/share"* "$pkgdir/usr/share"
- mv "$site/${_name/-/_}-$pkgver.data/data/etc"* "$pkgdir/etc/"
+ cd "${_name//-/_}-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ mv "$pkgdir/usr/etc" "$pkgdir" # Move /usr/etc stuff to /etc where it actually belongs
}