aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-tox/APKBUILD
blob: 0e36fd226c7030a6a3ff3176da17445b81663929 (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
52
53
54
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-tox
_pkgname=${pkgname#py-*}
pkgver=3.9.0
pkgrel=0
pkgdesc="virtualenv management and test command line tool"
url="https://tox.readthedocs.org/"
arch="noarch"
license="MIT"
_py2deps="py2-virtualenv py2-py py2-pluggy py2-argparse py2-six py2-filelock py2-toml"
_py3deps="py3-virtualenv py3-py py3-pluggy py3-argparse py3-six py3-filelock py3-toml"
makedepends="python2-dev python3-dev py-setuptools $_py2deps $_py3deps"
checkdepends="pytest"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

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

_py2() {
	depends="$_py2deps python2"
	_py python2
}

_py3() {
	depends="$_py3deps python3"
	_py python3
}

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

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

check() {
	cd "$builddir"
	python2 setup.py test
	python3 setup.py test
}

sha512sums="7cac28d4f8bc4c30f827a9770da43a06b19fdfec1251c079a380e161851d51df0d395d8b6499100c387a6d711352447a8fd2c14e1ebe6d3a9a0b08ca6c3464ee  tox-3.9.0.tar.gz"