[arch-commits] Commit in python2-pytest/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Mon Dec 23 12:21:13 UTC 2019


    Date: Monday, December 23, 2019 @ 12:21:12
  Author: felixonmars
Revision: 539143

upgpkg: python2-pytest 4.6.8-2

backport fix for https://github.com/pytest-dev/pytest/issues/6301

Modified:
  python2-pytest/trunk/PKGBUILD

----------+
 PKGBUILD |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-23 12:20:44 UTC (rev 539142)
+++ PKGBUILD	2019-12-23 12:21:12 UTC (rev 539143)
@@ -3,7 +3,7 @@
 
 pkgname=python2-pytest
 pkgver=4.6.8
-pkgrel=1
+pkgrel=2
 pkgdesc="Simple powerful testing with Python"
 arch=('any')
 license=('MIT')
@@ -16,15 +16,19 @@
               # Unlisted, but actually used. Check again after a while:
               'python2-numpy' 'python2-twisted' 'python2-pytest-xdist' 'python2-decorator'
               'python2-jinja' 'python2-pexpect')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz")
-sha512sums=('b6280ba1dec3f49bb54639d87e22936f655b2e67829e658715e151d70916b826b19cbc43812c17ead748e7927d5aab0b28f1a3a1059548400c71cd3830956230')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz"
+        module-rewrite.patch::https://github.com/pytest-dev/pytest/pull/6313.patch)
+sha512sums=('b6280ba1dec3f49bb54639d87e22936f655b2e67829e658715e151d70916b826b19cbc43812c17ead748e7927d5aab0b28f1a3a1059548400c71cd3830956230'
+            '7491b830529da28e6f60ac29bf7fd219f6281349b97d68d6de97ce657b211abb275b1cca7627877a23e761ca2277bd014a9360ada2f3ca22e482572893b29a1c')
 
 export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
 
 prepare() {
-  # Ignore warnings that break test
-  # sed -e 's|2 passed in|2 passed|' -i pytest-$pkgver/testing/test_pdb.py
-  :
+  cd pytest-$pkgver
+  # https://github.com/pytest-dev/pytest/issues/6301
+  patch -p1 -i ../module-rewrite.patch
+  # Python 2 compatibility
+  sed -i 's/yield from _iter_rewritable_modules(new_package_files)/for _module in _iter_rewritable_modules(new_package_files): yield _module/' src/_pytest/config/__init__.py
 }
 
 build() {



More information about the arch-commits mailing list