summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c900ef1bd74e9d1fc65dbfa96c6f4706e1f8ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Christopher Arndt <aur at chrisarndt dot de>
# Contributor: Simon Conseil <contact+aur at saimon dot org>
# Contributor: Jesus Alvarez

_name=radon
pkgname=python-$_name
pkgver=6.0.1
pkgrel=1
pkgdesc='A tool that computes various metrics for Python source code'
arch=(any)
url='https://radon.readthedocs.org/'
license=(MIT)
depends=('flake8>=3.0' python-colorama python-mando python-tomli)
makedepends=(python-sphinx python-setuptools)
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('d1ac0053943a893878940fedc8b19ace70386fc9c9bf0a09229a44125ebf45b5')


build() {
  cd $_name-$pkgver
  sed -i -e "s/mando[^']*/mando/" -e "s/colorama[^']*/colorama/" setup.py
  python setup.py build
  cd docs
  make html
}

package() {
  cd $_name-$pkgver
  python setup.py install --root="$pkgdir" --skip-build --optimize=1
  # documentation
  install -d "$pkgdir"/usr/share/doc/$pkgname
  cp -r docs/_build/html/* "$pkgdir"/usr/share/doc/$pkgname
  # license
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

# vim:set ts=2 sw=2 et: