# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer:
pkgname=jupyter-nbclassic
pkgver=1.1.0
pkgrel=0
pkgdesc="Jupyter notebook as jupyter server extension"
url="https://github.com/jupyter/nbclassic"
arch="noarch"
license="BSD-3-Clause"
depends="py3-traitlets jupyter-server jupyter-notebook-shim"
makedepends="py3-gpep517 py3-jupyter-packaging"
checkdepends="py3-pytest py3-pytest-tornasync py3-pytest-jupyter"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/nbclassic/releases/download/v$pkgver/nbclassic-$pkgver.tar.gz"
builddir="$srcdir/nbclassic-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a5348ff7bff944c12745111fcf64ca92d75bf7bc063d51baf04bc8894473ba0689ec4420ff1ce2d2a40601b55d14a1cd257215cd4f11839fa47e8ea93933268d  jupyter-nbclassic-1.1.0.tar.gz
"
