[arch-commits] Commit in thefuck/trunk (PKGBUILD)

Felix Yan fyan at archlinux.org
Wed Sep 9 11:31:05 UTC 2015


    Date: Wednesday, September 9, 2015 @ 13:31:05
  Author: fyan
Revision: 139680

upgpkg: thefuck 3.0-1

Modified:
  thefuck/trunk/PKGBUILD

----------+
 PKGBUILD |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-09 10:20:54 UTC (rev 139679)
+++ PKGBUILD	2015-09-09 11:31:05 UTC (rev 139680)
@@ -2,7 +2,7 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
 pkgname=thefuck
-pkgver=2.9.1
+pkgver=3.0
 pkgrel=1
 pkgdesc="Magnificent app which corrects your previous console command"
 arch=('any')
@@ -20,13 +20,22 @@
 }
 
 check() {
-  cd thefuck/tests
-  LC_CTYPE=en_US.utf8 PYTHONPATH="$PWD/build/lib:$PYTHONPATH" py.test
+  cd thefuck
+
+  # Hack distribution test by installing it and set PYTHONPATH afterwards
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+
+  # Hack $HOME as it's / in the chroot and not writable
+  cp tests/test_conf.py "$srcdir/test_conf.py.bak"
+  sed -i "s|data = {}|data = {'HOME': '$srcdir'}|" tests/test_conf.py
+  LC_CTYPE=en_US.utf8 PYTHONPATH="$PWD/tmp_install/usr/lib/python3.4/site-packages:$PYTHONPATH" py.test tests
+  mv "$srcdir/test_conf.py.bak" tests/test_conf.py
 }
 
 package() {
   cd thefuck
   python3 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
+  mv "$pkgdir"/usr/lib/python3.4/site-packages/{tests,thefuck/}
 
   install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
 }



More information about the arch-commits mailing list