[arch-commits] Commit in python-pytest-timeout/repos/community-staging-any (3 files)

Felix Yan fyan at archlinux.org
Wed Sep 23 01:05:20 UTC 2015


    Date: Wednesday, September 23, 2015 @ 03:05:20
  Author: fyan
Revision: 141500

archrelease: copy trunk to community-staging-any

Added:
  python-pytest-timeout/repos/community-staging-any/PKGBUILD
    (from rev 141499, python-pytest-timeout/trunk/PKGBUILD)
  python-pytest-timeout/repos/community-staging-any/pytest-2.8.patch
    (from rev 141499, python-pytest-timeout/trunk/pytest-2.8.patch)
Deleted:
  python-pytest-timeout/repos/community-staging-any/PKGBUILD

------------------+
 PKGBUILD         |  124 ++++++++++++++++++++++++++---------------------------
 pytest-2.8.patch |   50 +++++++++++++++++++++
 2 files changed, 113 insertions(+), 61 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-23 01:05:00 UTC (rev 141499)
+++ PKGBUILD	2015-09-23 01:05:20 UTC (rev 141500)
@@ -1,61 +0,0 @@
-# $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:

Copied: python-pytest-timeout/repos/community-staging-any/PKGBUILD (from rev 141499, python-pytest-timeout/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-09-23 01:05:20 UTC (rev 141500)
@@ -0,0 +1,63 @@
+# $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=3
+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"
+        pytest-2.8.patch)
+md5sums=('SKIP'
+         'aa75f95f3347cdcdd05eba5255ec3c74')
+
+prepare() {
+  # https://bitbucket.org/pytest-dev/pytest-timeout/issues/12/tests-failed-with-pytest-280
+  (cd $_pypiname; patch -p1 -i ../pytest-2.8.patch)
+
+  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
+}
+
+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:

Copied: python-pytest-timeout/repos/community-staging-any/pytest-2.8.patch (from rev 141499, python-pytest-timeout/trunk/pytest-2.8.patch)
===================================================================
--- pytest-2.8.patch	                        (rev 0)
+++ pytest-2.8.patch	2015-09-23 01:05:20 UTC (rev 141500)
@@ -0,0 +1,50 @@
+# HG changeset patch
+# User holger krekel <holger at merlinux.eu>
+# Date 1442952268 -7200
+# Branch fixpytest28
+# Node ID 5e239034ab0db1b58b96c7f6b38eb55814ee78de
+# Parent  ea3ba7b8f9b3ed4fe75d981f0f98765e71ef7a7a
+fix issue12: force runpytest() to use subprocesses instead of inline running.
+also streamline tox.ini to newly use py35 and scrap py31 and py32 where pytest is
+not aiming for compatibility itself.
+
+diff --git a/test_pytest_timeout.py b/test_pytest_timeout.py
+--- a/test_pytest_timeout.py
++++ b/test_pytest_timeout.py
+@@ -5,13 +5,19 @@
+ 
+ import pytest
+ 
+-
+ pytest_plugins = 'pytester'
+ 
+-
+ have_sigalrm = pytest.mark.skipif(not hasattr(signal, "SIGALRM"),
+                                   reason='OS does not have SIGALRM')
+ 
++ at pytest.fixture
++def testdir(testdir):
++    if hasattr(testdir, "runpytest_subprocess"):
++        # on pytest-2.8 runpytest runs inline by default
++        # patch the testdir instance to use the subprocess method
++        testdir.runpytest = testdir.runpytest_subprocess
++    return testdir
++
+ 
+ @have_sigalrm
+ def test_sigalrm(testdir):
+diff --git a/tox.ini b/tox.ini
+--- a/tox.ini
++++ b/tox.ini
+@@ -3,9 +3,9 @@
+ addopts = -rxs
+ 
+ [tox]
+-envlist = py26,py27,py31,py32,py33,py34,pypy,pypy3
++envlist = py26,py27,py33,py34,py35,pypy,pypy3
+ 
+ [testenv]
+ deps = pytest
+     pexpect
+-commands = py.test []
++commands = py.test {posargs}



More information about the arch-commits mailing list