1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=check-jsonschema
6 pkgdesc="A JSON Schema CLI and pre-commit hook built on jsonschema"
8 url="https://github.com/python-jsonschema/check-jsonschema"
29 # no tests in sdist tarballs
30 # https://github.com/python-jsonschema/check-jsonschema/issues/258
31 # https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz
32 $url/archive/$pkgver/$pkgname-$pkgver.tar.gz
34 sha512sums=('4ebb3f421396631430b546305a0c589cf553ee06925a8ead865111398f89b7396a0a03fedd535af04237e5de0aa54e9bbd5b384fdba830f1304d47c2474a0d85')
35 b2sums=('7e20a740dc163cc57175b27fc5bbef7d79954da7794a241ed0723f609e5890fe7cd3a501ecc3e6bfa33a446fc26577bdee3ba87e20b91795e45e2109235da08e')
38 # we don't support pinning
39 sed -e 's/==/>=/g' -i $pkgname-$pkgver/setup.cfg
44 python -m build --wheel --no-isolation
48 local pytest_options=(
51 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
54 # install to temporary location, as importlib is used
55 python -m installer --destdir=test_dir dist/*.whl
56 export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
57 pytest "${pytest_options[@]}"
62 python -m installer --destdir="$pkgdir" dist/*.whl