[arch-commits] Commit in python-pytest-timeout/trunk (PKGBUILD pytest-2.8.patch)

Felix Yan fyan at archlinux.org
Tue Apr 12 14:35:20 UTC 2016


    Date: Tuesday, April 12, 2016 @ 16:35:19
  Author: fyan
Revision: 170708

upgpkg: python-pytest-timeout 1.0.0-1

Modified:
  python-pytest-timeout/trunk/PKGBUILD
Deleted:
  python-pytest-timeout/trunk/pytest-2.8.patch

------------------+
 PKGBUILD         |   32 +++++++++++++-------------------
 pytest-2.8.patch |   50 --------------------------------------------------
 2 files changed, 13 insertions(+), 69 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-04-12 14:28:35 UTC (rev 170707)
+++ PKGBUILD	2016-04-12 14:35:19 UTC (rev 170708)
@@ -3,9 +3,8 @@
 
 pkgbase=python-pytest-timeout
 pkgname=('python-pytest-timeout' 'python2-pytest-timeout')
-_pypiname=pytest-timeout
-pkgver=0.5
-pkgrel=3
+pkgver=1.0.0
+pkgrel=1
 pkgdesc='py.test plugin to abort hanging tests'
 arch=('any')
 license=('MIT')
@@ -12,23 +11,18 @@
 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')
+source=("hg+https://bitbucket.org/pytest-dev/pytest-timeout#tag=$pkgver")
+md5sums=('SKIP')
 
 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}
+  cp -a pytest-timeout{,-py2}
 }
 
 build() {
-  cd "$srcdir/$_pypiname"
+  cd "$srcdir"/pytest-timeout
   python setup.py build
 
-  cd "$srcdir/$_pypiname-py2"
+  cd "$srcdir"/pytest-timeout-py2
   python2 setup.py build
 }
 
@@ -35,11 +29,11 @@
 check() {
   # Hack entry points by installing it
 
-  cd "$srcdir/$_pypiname"
+  cd "$srcdir"/pytest-timeout
   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"
+  cd "$srcdir"/pytest-timeout-py2
   python2 setup.py install --root="$PWD/tmp_install" --optimize=1
   PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2
 }
@@ -47,17 +41,17 @@
 package_python-pytest-timeout() {
   depends=('python-pytest')
 
-  cd "$srcdir/$_pypiname"
+  cd pytest-timeout
   python setup.py install --root="$pkgdir"/ --optimize=1
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 package_python2-pytest-timeout() {
   depends=('python2-pytest')
 
-  cd "$srcdir/$_pypiname-py2"
+  cd pytest-timeout-py2
   python2 setup.py install --root="$pkgdir"/ --optimize=1
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 # vim:set ts=2 sw=2 et:

Deleted: pytest-2.8.patch
===================================================================
--- pytest-2.8.patch	2016-04-12 14:28:35 UTC (rev 170707)
+++ pytest-2.8.patch	2016-04-12 14:35:19 UTC (rev 170708)
@@ -1,50 +0,0 @@
-# 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