Date: Saturday, March 29, 2014 @ 04:10:33
  Author: fyan
Revision: 108581

upgpkg: pep8 1.5.1-2

- pep8 now refers to the python3 version

Modified:
  pep8/trunk/PKGBUILD

----------+
 PKGBUILD |   50 ++++++++++++++++++++++++++++++++++----------------
 1 file changed, 34 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2014-03-29 02:58:20 UTC (rev 108580)
+++ PKGBUILD    2014-03-29 03:10:33 UTC (rev 108581)
@@ -4,9 +4,9 @@
 # Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
 
 pkgbase=pep8
-pkgname=("$pkgbase-python2" "$pkgbase-python3")
+pkgname=("$pkgbase" "$pkgbase-python2")
 pkgver=1.5.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Python style guide checker"
 arch=('any')
 url="http://github.com/jcrocholl/pep8/";
@@ -18,27 +18,35 @@
             '4a18840b7c132952f3f3d42c355289018ea263cbe75b25db31c9feb1b61e9b40')
 
 prepare() {
-  cp -r $pkgbase-$pkgver{,-python2}
+  cp -r $pkgbase-$pkgver{,-py2}
 
-  sed -i '1s/env python$/python2/' $pkgbase-$pkgver-python2/pep8.py
+  sed -i '1s/env python$/python2/' $pkgbase-$pkgver-py2/pep8.py
 }
 
-package_pep8-python2() {
-  depends=('python2' 'python2-setuptools')
-  provides=('pep8')
-  conflicts=('pep8')
-  replaces=('pep8')
-  
-  cd $pkgbase-$pkgver-python2
-  python2 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
-  mv "$pkgdir/usr/bin/pep8" "$pkgdir/usr/bin/pep8-python2"
+build() {
+  cd "${srcdir}/${pkgbase}-${pkgver}"
+  python setup.py build
 
-  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "${srcdir}/${pkgbase}-${pkgver}-py2"
+  python2 setup.py build
 }
 
-package_pep8-python3() {
+check() {
+  cd "${srcdir}/${pkgbase}-${pkgver}"
+  # Not passing tests for 1.5.1
+  #python setup.py test
+
+  cd "${srcdir}/${pkgbase}-${pkgver}-py2"
+  # Not passing tests for 1.5.1
+  #python2 setup.py test
+}
+
+package_pep8() {
   depends=('python' 'python-setuptools')
-  
+  provides=('pep8-python3')
+  conflicts=('pep8-python3')
+  replaces=('pep8-python3')
+
   cd $pkgbase-$pkgver
   python3 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
 
@@ -45,4 +53,14 @@
   install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
+package_pep8-python2() {
+  depends=('python2' 'python2-setuptools')
+  
+  cd $pkgbase-$pkgver-py2
+  python2 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
+  mv "$pkgdir/usr/bin/pep8" "$pkgdir/usr/bin/pep8-python2"
+
+  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
 # vim:set ts=2 sw=2 et:

Reply via email to