[arch-commits] Commit in python-wxpython/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Wed Nov 11 02:28:31 UTC 2020


    Date: Wednesday, November 11, 2020 @ 02:28:31
  Author: eschwartz
Revision: 749942

upgpkg: python-wxpython 4.0.7.2-3: remove unneeded pathlib2 makedep, fix tests

pathlib2 is never used, on python3 it uses pathlib and on python2 it vendors
pathlib2 for the build. We only care about the former.


Tests are bonkers, the builtin test runner reports pytest output but
unconditionally return success, make this explicit by the PKGBUILD pattern
|| echo "warning goes here"

Also the tests never ran due to passing pytest --boxed, but this needed
pytest-xdist and is now a no-op, because the behavior is now in pytest-forked
as --forked. Nevertheless, it makes for clearer errors if we get segfaults, so
reimplement this properly.

Modified:
  python-wxpython/trunk/PKGBUILD

----------+
 PKGBUILD |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-11 02:08:20 UTC (rev 749941)
+++ PKGBUILD	2020-11-11 02:28:31 UTC (rev 749942)
@@ -7,7 +7,7 @@
 pkgver=4.0.7.2
 _pkgver="${pkgver%.*}"
 _post="${pkgver##*.}"
-pkgrel=2
+pkgrel=3
 pkgdesc='Cross-platform GUI toolkit'
 arch=('x86_64')
 license=('custom:wxWindows')
@@ -14,8 +14,8 @@
 url='https://www.wxpython.org'
 depends=('wxgtk3' 'python-six')
 optdepends=('python-pypubsub: Alternative to the deprecated wx.lib.pubsub API')
-makedepends=('mesa' 'glu' 'webkit2gtk' 'python-pathlib2' 'python-requests' 'python-setuptools')
-checkdepends=('xorg-server-xvfb' 'python-pytest' 'python-numpy')
+makedepends=('mesa' 'glu' 'webkit2gtk' 'python-requests' 'python-setuptools')
+checkdepends=('xorg-server-xvfb' 'python-pytest-forked' 'python-numpy')
 source=("https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$_pkgver.post$_post.tar.gz")
 sha512sums=('7af89db90a0f7e6b644d61c1ede01ec36a2c295e46d44692ae9dbc4af923310c1b498a52f45b02a89e8917d844c6abe67e5f3fdd9c1d51da3312899319a349e4')
 
@@ -32,7 +32,8 @@
 check() {
   cd "$_pkgname-$_pkgver.post$_post"
 
-  xvfb-run python build.py test
+  # there are segfaulting tests so --forked ensures we get sensible results
+  PYTHONPATH=$PWD xvfb-run pytest --forked unittests || echo "==> WARNING: tests usually fail randomly"
 }
 
 package() {



More information about the arch-commits mailing list