APKBUILD 1.37 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
_pkgname=typed_ast
Leo's avatar
Leo committed
5
pkgver=1.4.1
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"
14
15
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	fix-linking-issue-asdl.patch"
prspkt's avatar
prspkt committed
16
17
18
19
20
21
builddir="$srcdir/"$_pkgname-$pkgver

build() {
	python3 setup.py build
}

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

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

40
41
sha512sums="a3154fe723aeadf998694aba0faf516e5b9abb876e4c7d91843b3694474ff6911b3e77a6cb7366cfa8e5a573b331906b6a0b134b25627aaba0dcbe92c4e25590  typed_ast-1.4.1.tar.gz
6d273d173ec483260141bece94d546a36b7048debd2b9c76b3ccd5743824a127a7b78a454140996777ea1a4dfc1e46f344c73157e00bc8a284719b483211d177  fix-linking-issue-asdl.patch"