# Contributor: Carlo Landmeter # Contributor: Jakub Jirutka # Maintainer: Stuart Cardall pkgname=py-configargparse _pkgname=ConfigArgParse pkgver=0.11.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" } 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"