upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-click-log / repos / community-any / PKGBUILD
blob94b2a2a9b310da69d9b519cdfc9106fc7e706e27
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 # Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>
5 _name=click-log
6 pkgname=python-click-log
7 pkgver=0.4.0
8 pkgrel=3
9 pkgdesc="Logging integration for Click"
10 arch=('any')
11 url="https://github.com/click-contrib/click-log"
12 license=('MIT')
13 depends=('python-click')
14 makedepends=('python-build' 'python-installer' 'python-setuptools'
15              'python-wheel')
16 checkdepends=('python-pytest')
17 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
18 sha256sums=('3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975')
19 b2sums=('8a7ce0c2a7617253f08d011958bce158e987faa0008065c9dac382d46b905cc88cd5cb19d0d0859bf522da6448f7c9a20c0a8efe53b3feb5efc9ca3f64cfbc27')
21 build() {
22   cd $_name-$pkgver
23   python -m build --wheel --skip-dependency-check --no-isolation
26 check() {
27   cd $_name-$pkgver
28   export PYTHONPATH="build:$PYTHONPATH"
29   pytest -v
32 package() {
33   cd $_name-$pkgver
34   python -m installer --destdir="$pkgdir" dist/*.whl
35   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
37   # Symlink license file
38   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
39   install -d "$pkgdir"/usr/share/licenses/$pkgname
40   ln -s "$site_packages"/click_log-$pkgver.dist-info/LICENSE \
41     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE