[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Sat Jul 1 18:22:29 UTC 2017


    Date: Saturday, July 1, 2017 @ 18:22:28
  Author: felixonmars
Revision: 242020

addpkg: python-tenacity 4.2.0-1

Added:
  python-tenacity/
  python-tenacity/repos/
  python-tenacity/trunk/
  python-tenacity/trunk/PKGBUILD

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

Added: python-tenacity/trunk/PKGBUILD
===================================================================
--- python-tenacity/trunk/PKGBUILD	                        (rev 0)
+++ python-tenacity/trunk/PKGBUILD	2017-07-01 18:22:28 UTC (rev 242020)
@@ -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:


Property changes on: python-tenacity/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property



More information about the arch-commits mailing list