PKGBUILDs/extra/jupyterlab/PKGBUILD
2024-05-24 18:42:34 -04:00

62 lines
1.8 KiB
Bash

# Maintainer: Antonio Rojas <arojas@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - export --max-old-space-size option to fix 32-bit FTBFS
# - moved npm from checkdepends to makedepends
pkgname=jupyterlab
_pipname=jupyterlab
pkgver=4.2.1
pkgrel=1
pkgdesc='JupyterLab computational environment'
arch=(any)
url='https://github.com/jupyterlab/jupyterlab'
license=(LicenseRef-JupyterLab)
depends=(jupyter-notebook-shim
jupyter-server
python
python-async-lru
python-httpx
python-importlib-metadata
python-ipykernel
python-jupyter-core
python-jupyterlab-server
python-packaging
python-tornado
python-traitlets)
makedepends=(git
python-build
python-hatch-jupyter-builder
python-installer
npm)
optdepends=('jupyter-collaboration: collaborative mode'
'jupyterlab-widgets: ipywidgets support'
'npm: to install extensions')
checkdepends=(python-jupyter-server-terminals
python-pytest-jupyter
python-pytest-tornasync)
source=(git+https://github.com/jupyterlab/jupyterlab#tag=v$pkgver)
sha256sums=('c867030c090caa36a2e48bff0c82dd5e35ffa96991509b62ca00b7b464a15820')
build() {
cd $pkgname
# https://github.com/nodejs/node/issues/48444
export UV_USE_IO_URING=0
export NODE_OPTIONS=--max-old-space-size=1024
python -m build --wheel --no-isolation
}
check() {
cd $pkgname
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest -v
}
package() {
cd $pkgname
python -m installer --destdir="$pkgdir" dist/*.whl
mv "$pkgdir"/usr/etc "$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}