# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=pgcli
pkgver=2.2.0
pkgrel=0
pkgdesc="Postgres CLI with autocompletion and syntax highlighting"
options="!check" # Tests fail
url="https://www.pgcli.com"
arch="noarch"
license="BSD-3-Clause"
depends="python3
	py3-pgspecial
	py3-click
	py3-pygments
	py3-prompt_toolkit>2.0.0
	py3-psycopg2
	py3-sqlparse<0.4.0
	py3-configobj
	py3-humanize
	py3-wcwidth
	py3-cli_helpers>1.0.0"
checkdepends="pytest py3-mock"
makedepends="python3-dev"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pgcli/pgcli-$pkgver.tar.gz"

check() {
	python3 -m pytest tests
}

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="20700a66b5fd91a6819bdc86184ec2ac1bb2f6e4a0e14b3f3034ba7f15b3c15d3a5d70a8250b1652c634cc3c4dedd17ab246b6f295eceddc9c332e57fc164dd5  pgcli-2.2.0.tar.gz"
