aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-configargparse/APKBUILD
blob: b1e377fd82d9149765854aba76ed3837f826bba5 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-configargparse
_pkgname=ConfigArgParse
pkgver=0.11.0
pkgrel=1
pkgdesc="A drop-in replacement for argparse"
url="https://github.com/bw2/ConfigArgParse"
arch="noarch"
license="MIT"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/bw2/$_pkgname/archive/$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"
}

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

_py3() {
	_py python3
}

_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"
}

md5sums="00b778f112297708249a05722c3db4b0  py-configargparse-0.11.0.tar.gz"
sha256sums="7f2843c1ee7adc398eabe8554720fb1f63fb162554f53f6f87745fe76b5bac6e  py-configargparse-0.11.0.tar.gz"
sha512sums="5effadc8859ab388313bbd6fdd0c1f9fd85d0599be42b8db0b4604f8964c3f0631be6a4484e1268f0b284b72e2888a7945e17e02e33604306277667a37ad2c34  py-configargparse-0.11.0.tar.gz"