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

Felix Yan felixonmars at archlinux.org
Fri Oct 25 16:09:48 UTC 2019


    Date: Friday, October 25, 2019 @ 16:09:47
  Author: felixonmars
Revision: 519406

archrelease: copy trunk to community-staging-any

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

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

Copied: python-invoke/repos/community-staging-any/PKGBUILD (from rev 519404, python-invoke/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-25 16:09:47 UTC (rev 519406)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-invoke
+pkgname=(python-invoke python2-invoke)
+pkgver=1.3.0
+pkgrel=2
+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=('c33e383d92065d2b9ca75dff3d51e46f19245a156535835b7545cf26ab4f839db7cac95328c4f370cda1a61432cc2ab85ba0f88b67f4b0c3a57cbeaff591e34c')
+
+prepare() {
+  find invoke-$pkgver -type f -name '*.pyc' -delete
+  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