Date: Saturday, October 8, 2022 @ 21:59:39 Author: grawlinson Revision: 1324442
upgpkg: python-jsonschema 4.16.0-2; improve test coverage * Improve test coverage. * Add various format dependencies to optdepends/checkdepends. * Change upstream URL. Modified: python-jsonschema/trunk/PKGBUILD ----------+ PKGBUILD | 82 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 18 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-10-08 21:55:26 UTC (rev 1324441) +++ PKGBUILD 2022-10-08 21:59:39 UTC (rev 1324442) @@ -1,4 +1,5 @@ -# Maintainer: Felix Yan <[email protected]> +# Maintainer: George Rawlinson <[email protected]> +# Contributor: Felix Yan <[email protected]> # Contributor: Daniel Wallace <danielwallace at gtmanfred.com> # Contributor: Bogdan Szczurek <[email protected]> # Contributor: Ismo Toijala <[email protected]> @@ -5,36 +6,81 @@ pkgname=python-jsonschema pkgver=4.16.0 -pkgrel=1 -pkgdesc="An implementation of JSON Schema validation for Python" +pkgrel=2 +pkgdesc='An implementation of JSON Schema validation for Python' arch=('any') -url="https://pypi.python.org/pypi/jsonschema" +url='https://github.com/python-jsonschema/jsonschema' license=('MIT') -depends=('python-attrs' 'python-pyrsistent') -makedepends=('python-build' 'python-installer' 'python-hatchling' 'python-hatch-vcs' - 'python-hatch-fancy-pypi-readme') -checkdepends=('python-twisted' 'python-idna' 'python-jsonpointer' 'python-strict-rfc3339' - 'python-pip' 'python-rfc3987' 'python-webcolors') -source=("$pkgname-$pkgver.tar.bz2::https://github.com/Julian/jsonschema/archive/v$pkgver.tar.gz") -sha512sums=('02815455d9e145206db002a16769085d7ba705ada32342d890fb2b88a03ec17a8420449354b8b320eee3c55d34a12ad55fe7876d6eaa895fba64db47aad485fe') +depends=( + 'python' + 'python-attrs' + 'python-pyrsistent' + 'python-typing_extensions' +) +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-wheel' + 'python-hatchling' + 'python-hatch-vcs' + 'python-hatch-fancy-pypi-readme' +) +checkdepends=( + 'python-pip' + 'python-twisted' + 'python-isoduration' + 'python-fqdn' + 'python-idna' + 'python-jsonpointer' + 'python-rfc3339-validator' + 'python-rfc3987' + 'python-uri-template' + 'python-webcolors' +) +optdepends=( + 'python-isoduration: check duration format' + 'python-fqdn: check hostname format' + 'python-idna: check idn-hostname format' + 'python-jsonpointer: check json-pointer & relative-json-pointer format' + 'python-rfc3339-validator: check date-time format' + 'python-rfc3987: for iri, iri-reference, uri & uri-reference format' + 'python-uri-template: for uri-template format' + 'python-webcolors: check color format' +) +_commit='ee024ffc61bee56b25e816f489d7365fe1445c6d' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') -export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver +pkgver() { + cd "$pkgname" + git describe --tags | sed 's/^v//' +} + build() { - cd jsonschema-$pkgver + cd "$pkgname" + python -m build --wheel --no-isolation } check() { - cd jsonschema-$pkgver + cd "$pkgname" + + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + + # install to temporary directory python -m installer --destdir="$PWD/tmp_install" dist/*.whl - PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages" \ + + PYTHONPATH="$PWD/tmp_install$site_packages" \ JSON_SCHEMA_TEST_SUITE=json trial jsonschema - python -m doctest README.rst } package() { - cd jsonschema-$pkgver + cd "$pkgname" + python -m installer --destdir="$pkgdir" dist/*.whl - install -Dm644 json/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" json/LICENSE }
