aboutsummaryrefslogblamecommitdiffstats
path: root/community/py-configargparse/APKBUILD
blob: 18cec80534f26b42a9cc13e51e6a08d8a89e700a (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                     
                                               
                                                          
                         
                       
             
        
                                            
                                           


             



                                                                                         

         


                                          


           



















                                                                  

 
                                                                                                                                                                              
# 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.13.0
pkgrel=0
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"
}

sha512sums="797c5edbc51353797204152b5c908ddb4e883a98f247430448d774957fd841286ea1a3cb87db3186e683a65f566cfce0a815e4bd558b9c823d9226d856341ca9  py-configargparse-0.13.0.tar.gz"