47 lines
1.7 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
pkgname=python-wxpython
_pkgname=wxPython
pkgver=4.2.2
_pkgver="${pkgver%.*}"
_post="${pkgver##*.}"
pkgrel=2
epoch=1
pkgdesc='Cross-platform GUI toolkit'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('custom:wxWindows')
url='https://www.wxpython.org'
depends=('wxwidgets-gtk3' 'python-six')
optdepends=('python-pypubsub: Alternative to the deprecated wx.lib.pubsub API')
makedepends=('mesa' 'glu' 'webkit2gtk' 'python-requests' 'python-setuptools' 'python-attrdict' 'sip' 'doxygen' 'waf')
checkdepends=('xorg-server-xvfb' 'python-pytest-forked' 'python-numpy')
source=("https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$pkgver.tar.gz")
sha512sums=('08b74285b94f21ebf30fef8c9ebf8cfd074dd3976209372bb5b704b0b792038f9af484dd1378894052eedb0ce603af6935b7d00d695da4e4a15e1ea3bdb3520f')
build() {
cd $_pkgname-$pkgver
# rm -r sip/{cpp,gen}/* # Recreate sip files with current wxWidgets - broken with doxygen 1.9.7 https://github.com/wxWidgets/Phoenix/issues/2414
SIP=/usr/bin/sip DOXYGEN=/usr/bin/doxygen WAF=/usr/bin/waf \
python build.py --nodoc sip build --use_syswx --release
}
check() {
cd $_pkgname-$pkgver
# 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() {
cd $_pkgname-$pkgver
python build.py install --destdir="$pkgdir"
install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
find "$pkgdir/usr/lib" -type f | xargs chmod 644
}