summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f0286448372ae60072b775ff0e2edd160f71722 (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
# Maintainer: Mario Finelli <mario at finel dot li>

pkgname=python-hcl2
pkgver=6.1.0
pkgrel=1
pkgdesc="A parser for HCL2 written in Python"
arch=(any)
url=https://github.com/amplify-education/python-hcl2
license=(MIT)
depends=(python python-lark)
makedepends=(git python-build python-installer python-setuptools 
             python-setuptools-scm python-wheel)
checkdepends=(python-coverage python-mock python-nose2)
source=(git+${url}.git#tag=v${pkgver})
sha256sums=('401fb4a2410c48fb3732068022792afca78104fa1e8e43444a9abb60ea8df4cc')

build() {
  cd $pkgname
  python -m build --wheel --no-isolation
}

check() {
  cd $pkgname
  nose2 --config tox.ini --verbose
}

package() {
  cd $pkgname
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
  install -Dm0644 CHANGELOG.md "$pkgdir/usr/share/doc/$pkgname/CHANGELOG.md"
  install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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