updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / python-amazon-product-api-hg / PKGBUILD
blobd14172491642292dc803838cb3d9612cb0e3cfdb
1 pkgname=python-amazon-product-api-hg
2 pkgver=337
3 pkgrel=1
4 pkgdesc="A Python wrapper for the Amazon Product Advertising API."
5 arch=('any')
6 url="http://bitbucket.org/basti/python-amazon-product-api/"
7 license=('BSD')
8 depends=('python2')
9 makedepends=('mercurial')
11 _hgroot="http://bitbucket.org/basti/"
12 _hgrepo="python-amazon-product-api"
14 build() {
15   cd $srcdir
17   if [ -d $_hgrepo/.hg ]; then
18     (cd $_hgrepo && hg up -r $pkgver)
19   else
20     hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
21   fi
23   msg 'Mercurial checkout done or server timeout'
25   if [ -d $_hgrepo-build ]; then
26     msg 'Removing old build directory'
27     rm -rf $_hgrepo-build
28   fi
29   
30   msg 'Copying repository to another build directory'
31   cp -r $srcdir/$_hgrepo $srcdir/$_hgrepo-build
32   
33   msg 'Starting 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
39