1 # Contributor: Andrew Grigorev <andrew@ei-grad.ru>
3 pkgname=django-keyedcache-hg
6 pkgdesc="Speedy way to manage caching in Django apps."
8 url="http://bitbucket.org/bkroeze/django-keyedcache"
14 _hgroot='http://bitbucket.org/bkroeze'
15 _hgrepo='django-keyedcache'
20 if [ -d $_hgrepo/.hg ]; then
21 (cd $_hgrepo && hg up -r $pkgver)
23 hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
26 msg 'Mercurial checkout done or server timeout'
28 if [ -d $_hgrepo-build ]; then
29 msg 'Removing old build directory'
33 msg 'Copying repository to another build directory'
34 cp -r $srcdir/$_hgrepo $srcdir/$_hgrepo-build
37 cd $srcdir/$_hgrepo-build
39 msg 'Running setup.py'
41 python2 setup.py build || return 1
42 python2 setup.py install --root=$pkgdir --optimize=1 || return 1
43 rm -rf $pkgdir/usr/lib/python2.7/site-packages/tests