summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7e6012ff5eb1ae026f87a92de2e5c7a5801e7ea1 (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
46
47
48
49
50
51
52
53
54
55
#  Maintainer: Blair Bonnett <blair.bonnett@gmail.com>
# Contributor: Maikel Wever <maikelwever@gmail.com>

pkgname=python-numpy-stl
pkgver=3.2.0
pkgrel=1
pkgdesc="Library to make working with STL files (and 3D objects in general) fast and easy"
url="https://github.com/WoLpH/numpy-stl/"
license=('BSD-3-Clause')
arch=('x86_64')

depends=(
  'glibc'
  'python-numpy'
  'python-utils'
)
makedepends=(
  'cython'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
  'python-pytest-cov'
  'xorg-server-xvfb'
)

source=(
  "numpy-stl-v${pkgver}.tar.gz::https://github.com/WoLpH/numpy-stl/archive/v${pkgver}.tar.gz"
)
sha256sums=(
  'e9c48258b74c7d575f038863c18437842930848c4dbbc199b24723394fb092c2'
)

build() {
  cd "numpy-stl-$pkgver"
  python -m build --wheel --no-isolation
}

check() {
  cd "numpy-stl-$pkgver"
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/"numpy_stl-$pkgver"*.whl
  test-env/bin/python -m pytest -vv tests --cov-fail-under=50
}

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

# vim:set ts=2 sw=2 et: