# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-typed-ast
_pkgname=typed_ast
pkgver=1.5.5
pkgrel=1
pkgdesc="Fork of the Python ast module with type comment support"
url="https://github.com/python/typed_ast"
arch="all"
license="Apache-2.0"
depends="python3"
makedepends="py3-setuptools python3-dev"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/"$_pkgname-$pkgver

# two (2) tests fail on s390x, disable
case "$CARCH" in
s390x) options="$options !check" ;;
esac

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=$(echo build/lib*) pytest -v
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
df0faae882c2f367fd5dc0aeeed12806307c739bfe2f466e199821f4197280e3d82fceee83580face3ef7b5bf184b29477f0828766f2b8991c3fbb2a4265eb3c  typed_ast-1.5.5.tar.gz
"
