# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Yen Chi Hsuan <yan12125 at gmail.com>
# Contributor: rich_o <rich_o@lavabit.com>
# Contributor: Jason St. John <jstjohn .. purdue . edu>
# Contributor: Daniel YC Lin <dlin.tw at gmail>

pkgname=python-texttable
pkgver=1.6.2
pkgrel=1
pkgdesc="Generate a formatted text table using ASCII characters"
arch=('any')
url="https://pypi.python.org/pypi/texttable/"
license=('LGPL')
depends=('python')
optdepends=('python-cjkwrap: for better CJK support')
makedepends=('python-cjkwrap' 'python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/foutaise/texttable/archive/v$pkgver.tar.gz")
sha512sums=('e59275c64813bd00fa5172c43491820122b6045e1a416c917576cbf595c1ec24d146e571708379f4b32775bda904f16ced0e9e15ab7b2dde78a214f26a1c4de6')

build() {
  cd texttable-$pkgver
  python setup.py build
}

check() {
  cd texttable-$pkgver
  pytest tests.py
}

package() {
  cd texttable-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
