[arch-commits] Commit in python-tenacity/repos (community-any community-any/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sat Jul 1 18:23:05 UTC 2017


    Date: Saturday, July 1, 2017 @ 18:23:04
  Author: felixonmars
Revision: 242021

archrelease: copy trunk to community-any

Added:
  python-tenacity/repos/community-any/
  python-tenacity/repos/community-any/PKGBUILD
    (from rev 242020, python-tenacity/trunk/PKGBUILD)

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

Copied: python-tenacity/repos/community-any/PKGBUILD (from rev 242020, python-tenacity/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2017-07-01 18:23:04 UTC (rev 242021)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-tenacity
+pkgname=('python-tenacity' 'python2-tenacity')
+pkgver=4.2.0
+pkgrel=1
+pkgdesc='Retry code until it succeeeds'
+arch=('any')
+license=('Apache')
+url='https://github.com/jd/tenacity'
+makedepends=('python-setuptools' 'python2-setuptools' 'python2-futures' 'python2-monotonic'
+             'python-pbr' 'python2-pbr')
+checkdepends=('python-nose' 'python2-nose')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/jd/tenacity/archive/$pkgver.tar.gz")
+sha512sums=('1521cc88d4b468b0cf3fa2d31ec7bdad0128e18fb5cfcb2dea05ec791faddb77b9af3f5b8baf0af576428fa95f367450c5c4caa004e370f42269e7c135fdae04')
+
+prepare() {
+  cp -a tenacity-$pkgver{,-py2}
+  sed -i '/monotonic/d' tenacity-$pkgver/requirements.txt
+  sed -i 's/from monotonic import monotonic/from time import monotonic/' tenacity-$pkgver/tenacity/__init__.py
+
+  export PBR_VERSION=$pkgver
+}
+
+build() {
+  cd "$srcdir"/tenacity-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/tenacity-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/tenacity-$pkgver
+  python setup.py nosetests
+
+  cd "$srcdir"/tenacity-$pkgver-py2
+  python2 setup.py nosetests --ignore-files '.*async.py'
+}
+
+package_python-tenacity() {
+  depends=('python-six')
+
+  cd tenacity-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-tenacity() {
+  depends=('python2-six' 'python2-futures' 'python2-monotonic')
+
+  cd tenacity-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list