1 pkgname=python-amazon-product-api-hg
4 pkgdesc="A Python wrapper for the Amazon Product Advertising API."
6 url="http://bitbucket.org/basti/python-amazon-product-api/"
9 makedepends=('mercurial')
11 _hgroot="http://bitbucket.org/basti/"
12 _hgrepo="python-amazon-product-api"
17 if [ -d $_hgrepo/.hg ]; then
18 (cd $_hgrepo && hg up -r $pkgver)
20 hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
23 msg 'Mercurial checkout done or server timeout'
25 if [ -d $_hgrepo-build ]; then
26 msg 'Removing old build directory'
30 msg 'Copying repository to another build directory'
31 cp -r $srcdir/$_hgrepo $srcdir/$_hgrepo-build
34 cd $srcdir/$_hgrepo-build
36 msg 'Running setup.py'
37 python2 setup.py build || return 1
38 python2 setup.py install --root=$pkgdir || return 1