[arch-commits] Commit in python-pytest-timeout/repos (2 files)
Felix Yan
fyan at archlinux.org
Mon Sep 21 02:21:33 UTC 2015
Date: Monday, September 21, 2015 @ 04:21:33
Author: fyan
Revision: 141326
archrelease: copy trunk to community-staging-any
Added:
python-pytest-timeout/repos/community-staging-any/
python-pytest-timeout/repos/community-staging-any/PKGBUILD
(from rev 141325, python-pytest-timeout/trunk/PKGBUILD)
----------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Copied: python-pytest-timeout/repos/community-staging-any/PKGBUILD (from rev 141325, python-pytest-timeout/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-21 02:21:33 UTC (rev 141326)
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-timeout
+pkgname=('python-pytest-timeout' 'python2-pytest-timeout')
+_pypiname=pytest-timeout
+pkgver=0.5
+pkgrel=2
+pkgdesc='py.test plugin to abort hanging tests'
+arch=('any')
+license=('MIT')
+url='https://bitbucket.org/pytest-dev/pytest-timeout'
+makedepends=('python-pytest' 'python2-pytest' 'mercurial')
+checkdepends=('python-pexpect' 'python2-pexpect')
+source=("hg+https://bitbucket.org/pytest-dev/pytest-timeout#tag=$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"
+ # Tests failed because of pytest 2.8.0, not python 3.5, so let's give upstream some time.
+ # https://bitbucket.org/pytest-dev/pytest-timeout/issues/12/tests-failed-with-pytest-280
+}
+
+package_python-pytest-timeout() {
+ 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-timeout() {
+ depends=('python2-pytest')
+
+ 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:
More information about the arch-commits
mailing list