upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-backcall / trunk / PKGBUILD
blob630886243e89ac35247ee33ba6d88552171ee512
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 _name=backcall
4 pkgname=python-backcall
5 pkgver=0.2.0
6 pkgrel=8
7 pkgdesc='Backwards compatible callback APIs'
8 arch=('any')
9 url=https://github.com/takluyver/backcall
10 license=('BSD')
11 depends=('python')
12 makedepends=('python-build' 'python-flit-core' 'python-installer')
13 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
14 sha256sums=('5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e')
15 b2sums=('67f9ac96d26b368972a5749775a70c497b5705b37d45ba7f64c1259be776cc7f4c9d78ae51da9c1e9e46521d33bf511790675688feef88a68d25ae30cd79612d')
17 build() {
18   cd $_name-$pkgver
19   python -m build --wheel --skip-dependency-check --no-isolation
22 check() {
23   cd $_name-$pkgver
24   python -m venv --system-site-packages test-env
25   test-env/bin/python -m installer dist/*.whl
26   test-env/bin/python tests/test_callback_prototypes.py
29 package() {
30   cd $_name-$pkgver
31   python -m installer --destdir="$pkgdir" dist/*.whl
33   # Symlink license file
34   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
35   install -d "$pkgdir"/usr/share/licenses/$pkgname
36   ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
37     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE