summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09dc42419c46947049778d2a650ee12013cdf8cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Allen M. <ase1590@hotmail.com>

pkgname=python-wxpython-git
pkgver=4.2.1.r25.g83db65a2
pkgrel=1
pkgdesc="Python 3 implementation of the WxPython UI library"
arch=(x86_64)
url="https://github.com/wxWidgets/Phoenix"
license=('custom:wxWindows')
depends=('wxwidgets-gtk3' 'python-six')
optdepends=('python-pypubsub: Alternative to the deprecated wx.lib.pubsub API')
makedepends=(git 'mesa' 'glu' 'webkit2gtk' 'python-requests' 'python-setuptools' 'python-attrdict' 'sip' 'doxygen' 'waf')
checkdepends=('xorg-server-xvfb' 'python-pytest-forked' 'python-numpy')
provides=(python-wxpython)
conflicts=(python-wxpython wxpython-phoenix-git)
replaces=(wxpython-phoenix-git)
source=("git+https://github.com/wxWidgets/Phoenix.git"
		"git+https://github.com/wxWidgets/wxWidgets.git"
        "git+https://github.com/wxWidgets/nanosvg.git")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd Phoenix
  git describe --long --tags --exclude last-sip* | sed 's/^wxPython-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare(){
  cd Phoenix
  git submodule init
  git config submodule.ext/wxWidgets.url "${srcdir}/wxWidgets"
  git config submodule.ext/nanosvg.url "${srcdir}/nanosvg"
  git -c protocol.file.allow=always submodule update
}

build(){
  cd Phoenix
  rm -r sip/{cpp,gen}/* # Recreate sip files with current wxWidgets
  #SIP=/usr/bin/sip DOXYGEN=/usr/bin/doxygen WAF=/usr/bin/waf \
  python build.py dox etg --nodoc sip build --use_syswx --release
}

check() {
  cd Phoenix
  # 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 Phoenix
  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
}