summaryrefslogtreecommitdiff
path: root/python-jupyter_telemetry/PKGBUILD
blob: 6ede59f35dec8c229485a4933fda114ff8a6b321 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Blair Bonnett <blair dot bonnett at gmail dot com>

pkgname=python-jupyter_telemetry
pkgver=0.0.5
pkgrel=60
pkgdesc="Configurable event-logging for Jupyter applications and extensions"
url="https://github.com/jupyter/telemetry"
arch=('any')
license=('BSD')
depends=(
  'python>=3.10'
  'python<3.11'
  'python-json-logger'
  'python-jsonschema'
  'python-ruamel-yaml'
  'python-traitlets'
)
makedepends=('git' 'python-setuptools')
checkdepends=('python-pytest')
source=(
  "telemetry-${pkgver}.tar.gz::https://github.com/jupyter/telemetry/archive/v${pkgver}.tar.gz"
)
sha512sums=('34dcdb7a0ac039b7386c50aef56dc499d4a9fec803892cbe2bb8f15e1b253f3e9fa24acfbad3371c11548ed7f4f0e142463b3307b455dd81beb40f5a24211111')

build() {
    cd "telemetry-${pkgver}"
    python setup.py build
}

check() {
    cd "telemetry-${pkgver}"
    PYTHONPATH="$PWD/build/lib:$PYTHONPATH" PYTHONDONTWRITEBYTECODE=1 pytest -v
}

package() {
    cd "telemetry-${pkgver}"
    python setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 --skip-build
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}