# Maintainer: 6543 <6543@obermui.de>
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: 6543 <6543@obermui.de>
pkgname=py3-canonicaljson
pkgver=2.0.0
pkgrel=2
pkgdesc="Canonical JSON"
url="https://github.com/matrix-org/python-canonicaljson"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-nose"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/matrix-org/python-canonicaljson/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-canonicaljson-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	nosetests
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/canonicaljson-$pkgver-*.whl
}

sha512sums="
953426264f231c5c598f7a2212fd566e6b0c51bd766778143283a3b6f7b01627f41d81c2355bacd0dcea9fb6992865092ad798f35a829845be2a9c18cff72a68  py3-canonicaljson-2.0.0.tar.gz
"
