summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8c505011d77e7e0f2677f5f115c47c2c5ed47e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>

pkgname=jupyterlab-pytutor
pkgver=0.2.0
pkgrel=5
pkgdesc="Python Tutor extension for JupyterLab"
arch=(any)
url="https://github.com/jupyterlab-contrib/jupyterlab-pytutor"
license=(BSD-3-Clause)
depends=(
  jupyterlab
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
  python-jupyter-packaging
  python-hatch-jupyter-builder
  python-hatch-nodejs-version
  python-hatchling
  npm
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
        'install.json')
sha256sums=('f21f24217649b6d9f848f6fb4d4928f64413eb01a6717a6697961805f2e63e1b'
            '493d16c764f090a6c4350644dc29898a18aab83c95240c59f6b9d98b99e6f9db')

prepare() {
  cd "$pkgname-$pkgver"

  # Replace uninstallation instructions with Arch-specific ones.
  cp "$srcdir/install.json" .
}

build() {
  cd "$pkgname-$pkgver"
  python -m build --no-isolation --wheel --skip-dependency-check
}

package() {
  cd "$pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}