[arch-commits] Commit in thefuck/repos (2 files)

Felix Yan fyan at archlinux.org
Sat Sep 19 11:22:31 UTC 2015


    Date: Saturday, September 19, 2015 @ 13:22:31
  Author: fyan
Revision: 140756

archrelease: copy trunk to community-staging-any

Added:
  thefuck/repos/community-staging-any/
  thefuck/repos/community-staging-any/PKGBUILD
    (from rev 140755, thefuck/trunk/PKGBUILD)

----------+
 PKGBUILD |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

Copied: thefuck/repos/community-staging-any/PKGBUILD (from rev 140755, thefuck/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2015-09-19 11:22:31 UTC (rev 140756)
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=thefuck
+pkgver=3.0
+pkgrel=2
+pkgdesc="Magnificent app which corrects your previous console command"
+arch=('any')
+url="https://github.com/nvbn/thefuck"
+license=('MIT')
+depends=('python-setuptools' 'python-psutil' 'python-six' 'python-colorama' 'python-decorator')
+makedepends=('git')
+checkdepends=('python-pytest-mock' 'python-mock' 'python-pexpect')
+source=("git+https://github.com/nvbn/thefuck.git#tag=$pkgver")
+sha256sums=('SKIP')
+
+build() {
+  cd thefuck
+  python setup.py build
+}
+
+check() {
+  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.5/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.5/site-packages/{tests,thefuck/}
+
+  install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list