archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-fastjsonschema / trunk / PKGBUILD
blobfb3da7d20bed6257239c22bfc7f0b2589b9c6d3c
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=fastjsonschema
4 pkgname=python-fastjsonschema
5 _commit=4f11540d2e8f7c0aeae1230cdbc65a99f1b277c4 # refs/tags/v2.16.3
6 pkgver=2.16.3
7 pkgrel=4
8 pkgdesc="Fast JSON schema validator for Python"
9 arch=(any)
10 url="https://github.com/horejsek/python-fastjsonschema"
11 license=(BSD)
12 depends=(python)
13 makedepends=(git python-build python-installer python-setuptools python-wheel)
14 checkdepends=(python-pytest)
15 # tests and additional assets not in sdist tarball: https://github.com/horejsek/python-fastjsonschema/issues/138
16 # source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
17 source=(
18   git+https://github.com/horejsek/python-fastjsonschema#commit=$_commit
19   git+https://github.com/json-schema-org/JSON-Schema-Test-Suite
21 sha512sums=('SKIP'
22             'SKIP')
23 b2sums=('SKIP'
24         'SKIP')
26 prepare() {
27   cd $pkgname
28   git submodule init
29   git config submodule.JSON-Schema-Test-Suite.url ../JSON-Schema-Test-Suite
30   git -c protocol.file.allow=always submodule update
33 build() {
34   cd $pkgname
35   python -m build --wheel --no-isolation
38 check() {
39   cd $pkgname
40   pytest -vv -m "not benchmark"
43 package() {
44   cd $pkgname
45   python -m installer --destdir="$pkgdir" dist/*.whl
46   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
47   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"