# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py3-jsonschema pkgver=4.7.2 pkgrel=3 pkgdesc="An implementation of JSON Schema validation for Python" url="https://github.com/python-jsonschema/jsonschema" arch="noarch" license="MIT" depends="python3 py3-pyrsistent py3-attrs" makedepends="py3-gpep517 py3-installer py3-hatchling py3-hatch-vcs py3-setuptools_scm py3-wheel" checkdepends="py3-twisted py3-pytest" source="https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-$pkgver.tar.gz skip-license-test.patch " builddir="$srcdir/jsonschema-$pkgver" replaces="py-jsonschema" # Backwards compatibility provides="py-jsonschema=$pkgver-r$pkgrel" # Backwards compatibility build() { gpep517 build-wheel \ --wheel-dir dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages testenv testenv/bin/python3 -m installer dist/*.whl testenv/bin/python3 -m twisted.trial jsonschema } package() { python3 -m installer -d "$pkgdir" \ dist/jsonschema-$pkgver-py3-none-any.whl # Add version suffix to executable files. local path; for path in "$pkgdir"/usr/bin/*; do mv "$path" "$path"-3 done ln -s jsonschema-3 "$pkgdir"/usr/bin/jsonschema } sha512sums=" c624d7bf317ca20fd8cdd248ec7d7679fde907ab304f1a092fc7a172464f43e41904d3f88df57e1351043b978448f51166a09af3625f00a9ad4d7353033b80af jsonschema-4.7.2.tar.gz 4e74925bfa689bb53840f31faed361463e82bb2fd16c86a90de7cbcd0d1d6949c81944bc60e8d2068a6043e1da64b62fd48a062d683e9b96d6bc9b6603b2ccd6 skip-license-test.patch "