archrelease: copy trunk to community-any
[arch-community.git] / python-flake8-docstrings / repos / community-any / PKGBUILD
blobacd72b9f13b70df7d2582f0a45939e778ca44d04
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Daniel M. Capella <polyzen@archlinux.org>
3 # Contributor: Pieter Goetschalckx <3.14.e.ter <at> gmail <dot> com>
5 pkgname=python-flake8-docstrings
6 pkgver=1.7.0
7 pkgrel=1
8 pkgdesc='Plugin to flake8 to include checks provided by pydocstyle'
9 arch=('any')
10 url='https://github.com/pycqa/flake8-docstrings'
11 license=('MIT')
12 depends=('python' 'flake8' 'python-pydocstyle')
13 makedepends=(
14   'git'
15   'python-build'
16   'python-installer'
17   'python-setuptools'
18   'python-wheel'
20 _commit='cd8a6e79f276b8b9d085776e5c2d8fc256f77e30'
21 source=("$pkgname::git+$url#commit=$_commit")
22 b2sums=('SKIP')
24 pkgver() {
25   cd "$pkgname"
27   git describe --tags | sed 's/^v//'
30 build() {
31   cd "$pkgname"
33   python -m build --wheel --no-isolation
36 package() {
37   cd "$pkgname"
39   python -m installer --destdir="$pkgdir" dist/*.whl
41   # license
42   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
43   install -d "$pkgdir/usr/share/licenses/$pkgname"
44   ln -s "$site_packages/flake8_docstrings-$pkgver.dist-info/LICENSE" \
45     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"