aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-gflags/APKBUILD
blob: b3bc4f62938adf3ce1b44b76bcebc5fc38abe3a7 (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
# Maintainer: Peter Bui <pnutzh4x0r@gmail.com>
pkgname=py-gflags
_pkgname=python-gflags
pkgver=3.1.1
pkgrel=0
pkgdesc="Commandline flags module for Python"
url="https://github.com/google/python-gflags"
arch="noarch"
license="BSD"
makedepends="python2-dev py-setuptools python3"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://github.com/google/$_pkgname/releases/download/$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

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

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

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	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="28009cdc09b94b416af5237d3897d6ab516cc3b6a3eed18a31adb8c199f31a8c7d07b1d69794cb37de84b50eefbde1de57f9f0afaeac0a4747b352f4024ef12c  python-gflags-3.1.1.tar.gz"