1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
2 # Contributor: Mubashshir <ahmubashshir@gmail.com>
8 pkgdesc='Python bindings for jq'
10 url=https://github.com/mwilliamson/jq.py
12 depends=('jq' 'python')
13 makedepends=('cython' 'git' 'python-build' 'python-installer'
14 'python-setuptools' 'python-wheel')
15 checkdepends=('python-pytest')
16 source=("git+$url.git#tag=$pkgver"
19 'ea5061ea7d4bad240c0df82dec3a430a583f1596685a8b4b36f1a0ee6bcae745586f5b1abf3985a8bb0e13523ef084bd6e05f9f430df247c2a6ec2044f99017a')
24 patch --forward --input=../jq-py-setup.patch
30 python -m build --wheel --skip-dependency-check --no-isolation
35 python -m venv --system-site-packages test-env
36 test-env/bin/python -m installer dist/*.whl
37 test-env/bin/python -m pytest
42 python -m installer --destdir="$pkgdir" dist/*.whl
44 # Symlink license file
45 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
46 install -d "$pkgdir"/usr/share/licenses/$pkgname
47 ln -s "$site_packages"/jq-$pkgver.dist-info/LICENSE \
48 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE