summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 900b2c4db60d43a40c49bc85406b7253610d305a (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
# Maintainer: Maikel Wever <maikelwever@gmail.com>
# Maintainer: Matthew Gamble <git@matthewgamble.net>

pkgname=python-coloredlogs
pkgver=15.0.1
pkgrel=2
pkgdesc="Colored terminal output for Python's logging module"
arch=('any')
url="https://github.com/xolox/python-coloredlogs"
license=('MIT')
depends=('python' 'python-humanfriendly')
makedepends=('python-setuptools' 'python-sphinx')
source=("https://github.com/xolox/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('e8161222671bb129f7936cd220c275a3cbc0a6c22313bd4483114b9526e5695f')

build() {
  cd "${pkgname}-${pkgver}"

  python setup.py build

  cd docs
  sphinx-build -nb html -d build/doctrees . build/html
}

package() {
  cd "${pkgname}-${pkgver}"

  PYTHONHASHSEED=0 python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-coloredlogs/LICENSE.txt"
  install -Dm644 CHANGELOG.rst "${pkgdir}/usr/share/doc/python-coloredlogs/CHANGELOG.rst"
  cp -r docs/build/html "${pkgdir}/usr/share/doc/python-coloredlogs/html"
}

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