aboutsummaryrefslogblamecommitdiffstats
path: root/community/py-hglib/APKBUILD
blob: a910d6f89cc756ece5993ad407783cb4436985bf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                                    
            





                                                                       
                      





                                                                                            







                              
























                                                                  
                                                                                                                                                                        
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py-hglib
_pkgname=python-hglib
pkgver=2.6.1
pkgrel=0
pkgdesc="A fast and convenient interface to Mercurial's command server"
url="https://pypi.python.org/pypi/python-hglib"
arch="noarch"
license="MIT"
makedepends="mercurial python2-dev py-setuptools python3-dev"
checkdepends="py-nose"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

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

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

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="3895c38d07cf3d66c711ad37d312535d233430938c536c6e8e548c34bbe3deb5a1f3cc5ad05151e28cac86657d7cdb4bc0a55a1ea5f78aa42856b694cfbe8c97  python-hglib-2.6.1.tar.gz"