archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-qtconsole / trunk / PKGBUILD
blobf7ead6881fe94a706bba0188c8bcc4e5ca6e98b7
1 # Maintainer: Kyle Keen <keenerd@gmail.com>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
4 _pkgname=qtconsole
5 pkgname=python-qtconsole
6 pkgver=5.4.3
7 pkgrel=1
8 pkgdesc="Qt-based console for Jupyter with support for rich media output"
9 arch=(any)
10 url="https://qtconsole.readthedocs.io/"
11 license=(BSD)
12 depends=(
13     python-ipykernel
14     python-ipython-genutils
15     python-jupyter_core
16     python-jupyter_client
17     python-traitlets
18     python-pygments
19     python-pyqt5
20     python-pyzmq
21     python-qtpy
22     qt5-svg
24 makedepends=(python-setuptools)
25 checkdepends=(python-pytest python-pytest-qt python-flaky xorg-server-xvfb)
26 source=(https://github.com/jupyter/${_pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
27 sha256sums=('991f8c6e30f83018df4e75c2f63dea6ee90b345b1c9461c79f422e96f389e551')
29 build() {
30   cd ${_pkgname}-${pkgver}
31   python setup.py build
34 check() {
35   cd ${_pkgname}-${pkgver}
36   xvfb-run -s '-nolisten local' pytest -x -vv --color=yes qtconsole
39 package() {
40   cd ${_pkgname}-${pkgver}
41   python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
43   install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
45   cd examples
46   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
47   sed -i "s|^Icon=.*$|Icon=${site_packages}/qtconsole/resources/icon/JupyterConsole.svg|" jupyter-qtconsole.desktop
48   install -Dm644 jupyter-qtconsole.desktop -t "${pkgdir}"/usr/share/applications/