[arch-commits] Commit in (4 files)

Felix Yan fyan at archlinux.org
Mon Sep 21 05:39:20 UTC 2015


    Date: Monday, September 21, 2015 @ 07:39:20
  Author: fyan
Revision: 141343

addpkg: python-pytest-benchmark 3.0.0a1-1

Added:
  python-pytest-benchmark/
  python-pytest-benchmark/repos/
  python-pytest-benchmark/trunk/
  python-pytest-benchmark/trunk/PKGBUILD

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

Added: python-pytest-benchmark/trunk/PKGBUILD
===================================================================
--- python-pytest-benchmark/trunk/PKGBUILD	                        (rev 0)
+++ python-pytest-benchmark/trunk/PKGBUILD	2015-09-21 05:39:20 UTC (rev 141343)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-benchmark
+pkgname=('python-pytest-benchmark' 'python2-pytest-benchmark')
+_pypiname=pytest-benchmark
+pkgver=3.0.0a1
+pkgrel=1
+pkgdesc='A py.test fixture for benchmarking code'
+arch=('any')
+license=('BSD')
+url='https://github.com/ionelmc/pytest-benchmark'
+makedepends=('python-pytest' 'python2-pytest' 'python2-statistics' 'git')
+checkdepends=('python-pytest-cov' 'python2-pytest-cov')
+source=("git+https://github.com/ionelmc/pytest-benchmark.git#tag=v$pkgver")
+md5sums=('SKIP')
+
+prepare() {
+  cp -a "${srcdir}/${_pypiname}"{,-py2}
+}
+
+build() {
+  cd "$srcdir/$_pypiname"
+  python setup.py build
+
+  cd "$srcdir/$_pypiname-py2"
+  python2 setup.py build
+}
+
+check() {(
+  # Hack entry points by installing it
+
+  cd "$srcdir/$_pypiname"
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.5/site-packages:$PYTHONPATH" py.test
+
+  cd "$srcdir/$_pypiname-py2"
+  python2 setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2
+  ) || warning "Tests failed"
+  # We don't have pygal for now.
+}
+
+package_python-pytest-benchmark() {
+  depends=('python-pytest')
+
+  cd "$srcdir/$_pypiname"
+  python setup.py install --root="$pkgdir"/ --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-pytest-benchmark() {
+  depends=('python2-pytest' 'python2-statistics')
+
+  cd "$srcdir/$_pypiname-py2"
+  python2 setup.py install --root="$pkgdir"/ --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:


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



More information about the arch-commits mailing list