summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 98c2c75d620dc8fae6d484e4e1ad256399710698 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Andrew Steinke <rkcf@rkcf.me>
# Contributor: mdraw.gh at gmail dot com

pkgbase=python-better-exceptions
_pkgbase='better-exceptions'
pkgname=(python-better-exceptions python2-better-exceptions)
pkgver=0.2.2
pkgrel=2
pkgdesc="Pretty and useful exceptions in Python, automatically"
arch=('any')
url='https://github.com/Qix-/better-exceptions'
license=('MIT')
depends=('python' 'python2')
makedepends=('python-setuptools' 'python2-setuptools')
source=("$url/archive/$pkgver.tar.gz")
md5sums=('40e33eb6a58c219e3425ea7c6a8f4811')

prepare() {
  cp -rup "$_pkgbase-$pkgver" "${_pkgbase}2-$pkgver"
}

build() {
  cd "$srcdir/$_pkgbase-$pkgver"
  python setup.py build

  cd "$srcdir/$_pkgbase-$pkgver"
  python2 setup.py build
}

package_python-better-exceptions() {
  depends=('python')
  makedepends=('python-setuptools')
  conflicts=('python-better-exceptions-git')

  cd "$srcdir/$_pkgbase-$pkgver"
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_python2-better-exceptions() {
  depends=('python2')
  makedepends=('python2-setuptools')
  conflicts=('python2-better-exceptions-git')

  cd "$srcdir/$_pkgbase-$pkgver"
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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