APKBUILD 1.17 KB
Newer Older
prspkt's avatar
prspkt committed
1
2
3
# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-typed-ast
4
5
_pkgname=typed_ast
pkgver=1.4.0
6
pkgrel=1
prspkt's avatar
prspkt committed
7
8
9
10
11
12
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"
13
checkdepends="py3-pytest"
prspkt's avatar
prspkt committed
14
15
16
17
18
19
20
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/"$_pkgname-$pkgver

build() {
	python3 setup.py build
}

prspkt's avatar
prspkt committed
21
# two (2) tests fail on s390x, disable
prspkt's avatar
prspkt committed
22
check() {
prspkt's avatar
prspkt committed
23
	local _pyarch
24
	local _py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
25
	case "$CARCH" in
prspkt's avatar
prspkt committed
26
27
28
29
		x86_64|aarch64|ppc64le) _pyarch="$CARCH" ;;
		x86) _pyarch=i686 ;;
		armhf|armv7) _pyarch=armv8l ;;
		s390x) return 0 ;;
30
	esac
31
	PYTHONPATH="$builddir/build/lib.linux-$_pyarch-$_py3ver" py.test-3 -v
prspkt's avatar
prspkt committed
32
33
34
35
36
37
}

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

38
sha512sums="b74e7fc51cde16439eae7cf41f0bdb95b5998362eccb73cf736f343cdab64daab63bc0f95f05a4911b229761749bdd31ac83423b58f2f3e1e1dadc7e6015bc1c  typed_ast-1.4.0.tar.gz"