aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-six/APKBUILD
blob: 1c9b5d097d810f45c3e9bb226a3991eb14f2cfb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: 
# Maintainer: 
pkgname=py-six
_pkgname=six
pkgver=1.12.0
pkgrel=0
pkgdesc="Python 2 and 3 compatibility library"
url="https://pypi.python.org/pypi/six"
arch="noarch"
license="MIT"
depends=""
checkdepends="pytest"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/benjaminp/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python2 setup.py build
	python3 setup.py build
}

check() {
        python2 -m pytest -rfsxX
        python3 -m pytest -rfsxX
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

sha512sums="67f218ec591411b4a460e4e2744083b7e128440a50d006433cd85a7485b3f4bbf37830bee4cfd3e24194e4873f9ad251a62900e2f5fce7429d647b3df14543c3  py-six-1.12.0.tar.gz"