# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py3-hid-parser
pkgver=0.0.3
pkgrel=2
pkgdesc="Typed pure Python library to parse HID report descriptors"
url="https://github.com/usb-tools/python-hid-parser"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="
	py3-hypothesis
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="https://github.com/usb-tools/python-hid-parser/archive/$pkgver/py3-hid-parser-$pkgver.tar.gz"
builddir="$srcdir/python-hid-parser-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" python -m pytest  \
		-k 'not test_variableitem_compliance and not test_arrayitem_compliance'

}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
5a4aa88b93f5fc56d0038842dbbc310c41ce4ac1785eb0ecd3a1b48c8d05015fe3c39700b2fccc316778ad11e985093916df739720d90b04be379a14177535d5  py3-hid-parser-0.0.3.tar.gz
"
