summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ef2b8574605ab4c25495d1039989180dfdd62c9 (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Germán Osella Massa <gosella@gmail.com>
_base=mpld3
pkgname=python-${_base}
pkgver=0.5.11
pkgrel=1
pkgdesc="D3 Viewer for Matplotlib"
arch=(any)
url="https://${_base}.github.io"
license=(BSD-3-Clause)
depends=(python-jinja python-matplotlib)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz)
sha512sums=('f83c517cd86ca8487f895630a136b22ac8f040eb119b5eab23d7e05f7be894ef3edd67339f3e02344822678c4d6841fd75916b90eca3d739912d78edad79a942')

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

check() {
  cd ${_base}-${pkgver}
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest --ignore=${_base}/tests/test_d3_snapshots.py
}

package() {
  cd ${_base}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}