# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-zope-testrunner
_pkgname=zope.testrunner
pkgver=6.5
pkgrel=0
pkgdesc="Zope testrunner script"
options="!check" # Fails to run
url="https://github.com/zopefoundation/zope.testrunner"
arch="noarch"
license="ZPL-2.1"
depends="python3 py3-setuptools py3-zope-exceptions py3-zope-interface"
makedepends="py3-gpep517 py3-wheel"
checkdepends="py3-zope-testing"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare

	#Remove ancient python2.5 reference
	rm -rf $builddir/src/zope/testrunner/tests/testrunner-ex-251759
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f0935a18b28d9413222aaf745db266df7b6aa6a810edeb7ba11f990ea0a55605d115eb32abba333730955961b571825cb0edb4dfcb55a297f5e2bc95da561711  zope.testrunner-6.5.tar.gz
"
