summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b41f480e6bbc7e0be3734dccb65773e1a091908 (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
# Maintainer: Matt Quintanilla <matt @ matt quintanilla . xyz>
pkgname=python-pretty-errors-git
pkgver=1.891da7e
pkgrel=1
pkgdesc="Prettifies Python exception output to make it legible."
arch=('any')
url="https://github.com/onelivesleft/PrettyErrors/"
license=('MIT')
depends=('python' 'python-colorama')
makedepends=('git' 'python-wheel' 'python-build' 'python-installer')
source=("pretty-errors-git::git+https://github.com/onelivesleft/PrettyErrors.git")
provides=('python-pretty-errors')
conflicts=('python-pretty-errors')
md5sums=('SKIP')

pkgver() {
  mkdir python-pretty-errors-git
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/pretty-errors-git"
python -m build
}

package() {
  cd "$srcdir/pretty-errors-git"
  install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" LICENSE
  python -m installer --destdir="$pkgdir" dist/*.whl
}