git » namcap.git » commit 4ae001f

Rebuild for python2.

author Rémy Oudompheng
2010-08-30 18:45:14 UTC
committer Rémy Oudompheng
2010-08-30 18:45:14 UTC
parent 681a87a00cdeb04cb3d3e278c384081011a052fa

Rebuild for python2.

PKGBUILD +5 -3

diff --git a/PKGBUILD b/PKGBUILD
index b926c7e..05a6a73 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,17 +2,19 @@
 
 pkgname=namcap
 pkgver=2.6
-pkgrel=1
+pkgrel=2
 pkgdesc="A Pacman package analyzer"
 arch=('any')
 url="http://projects.archlinux.org/namcap.git/"
 license=('GPL')
-depends=('python>=2.6' 'licenses')
+depends=('python2' 'licenses')
 source=(ftp://ftp.archlinux.org/other/$pkgname/${pkgname}-${pkgver}.tar.gz)
 md5sums=('4ea759bf0793ceb8342953f7520dc643')
 sha256sums=('4d69ad723e7d0e9054c0031fec7f1586ccaf42f08bbb96308a93baae10d8e19d')
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
-  ./setup.py install --root=${pkgdir} || return 1
+  python2 ./setup.py install --root=${pkgdir}
+  sed -i -e 's/^python/python2/' "$pkgdir"/usr/bin/namcap
+  sed -i -e 's/env python/env python2/' "${pkgdir}"/usr/lib/python2.7/site-packages/namcap.py
 }