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

Felix Yan felixonmars at archlinux.org
Thu Jul 12 19:55:23 UTC 2018


    Date: Thursday, July 12, 2018 @ 19:55:22
  Author: felixonmars
Revision: 358137

archrelease: copy trunk to community-staging-any

Added:
  python-invoke/repos/community-staging-any/
  python-invoke/repos/community-staging-any/PKGBUILD
    (from rev 358136, python-invoke/trunk/PKGBUILD)

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

Copied: python-invoke/repos/community-staging-any/PKGBUILD (from rev 358136, python-invoke/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-12 19:55:22 UTC (rev 358137)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-invoke
+pkgname=(python-invoke python2-invoke)
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="Pythonic task execution"
+url="https://github.com/pyinvoke/invoke"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-mock' 'python2-mock'
+              'python-pytest-relaxed' 'python2-pytest-relaxed')
+source=("https://pypi.io/packages/source/i/invoke/invoke-$pkgver.tar.gz")
+sha512sums=('6b8ebee7d2dd68fe0134491b15a3b85fd6d1493c5b81f00ba577c6bcf3e4a264d74f68bdd0d40a4c5bdde18c021395ee335d10dde8e676bc9efb313e1ae9b55c')
+
+prepare() {
+  cp -a invoke-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/invoke-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/invoke-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/invoke-$pkgver
+  python setup.py pytest || warning "Tests failed"
+
+  cd "$srcdir"/invoke-$pkgver-py2
+  python2 setup.py pytest || warning "Tests failed"
+}
+
+package_python-invoke() {
+  depends=('python')
+
+  cd invoke-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-invoke() {
+  depends=('python2')
+
+  cd invoke-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  for _exe in "$pkgdir"/usr/bin/*; do
+    mv "$_exe"{,2}
+  done
+}



More information about the arch-commits mailing list