# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-verboselogs
pkgver=1.7
pkgrel=5
pkgdesc="Verbose logging level for Python's logging module"
url="https://verboselogs.readthedocs.io/en/latest/"
arch="noarch !s390x" # py3-pylint
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pylint py3-mock py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/v/verboselogs/verboselogs-$pkgver.tar.gz"
builddir="$srcdir/verboselogs-$pkgver"

case "$CARCH" in
s390x)
	# no pylint
	options="!check"
	;;
esac

build() {
	python3 setup.py build
}

check() {
	# test fails on pylint > 1.4
	pytest --deselect verboselogs/tests.py::VerboseLogsTestCase::test_pylint_plugin verboselogs/tests.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
	find "$pkgdir" -name "*tests*" -delete
}

sha512sums="
13e96ac21e1cb5c68428b348bab63fc4d4ad34eaffe8e1554c05380f9115d2a3ccc6fa2e0a5ca8941e73bfb06537a3e46f29880e7ba3f47da0284279a9740211  verboselogs-1.7.tar.gz
"
