x11-wm/lumina: fix dependencies, install icons and session file
[gentoo.git] / x11-wm / qtile / qtile-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
6
7 inherit distutils-r1 virtualx
8
9 if [[ ${PV} == 9999* ]] ; then
10         EGIT_REPO_URI="https://github.com/qtile/qtile.git"
11         inherit git-r3
12 else
13         SRC_URI="https://github.com/qtile/qtile/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14         KEYWORDS="~amd64 ~x86"
15 fi
16
17 DESCRIPTION="A full-featured, hackable tiling window manager written in Python"
18 HOMEPAGE="http://qtile.org/"
19
20 LICENSE="MIT"
21 SLOT="0"
22 IUSE="test"
23 # docs require sphinxcontrib-blockdiag and sphinxcontrib-seqdiag
24
25 RDEPEND="
26         x11-libs/cairo[xcb]
27         x11-libs/pango
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         >=dev-python/cairocffi-0.7[${PYTHON_USEDEP}]
30         >=dev-python/cffi-1.1.0[${PYTHON_USEDEP}]
31         >=dev-python/six-1.4.1[${PYTHON_USEDEP}]
32         >=dev-python/xcffib-0.5.0[${PYTHON_USEDEP}]
33         $(python_gen_cond_dep 'dev-python/trollius[${PYTHON_USEDEP}]' 'python2*')
34 "
35 DEPEND="${RDEPEND}
36         test? (
37                 dev-python/pytest[${PYTHON_USEDEP}]
38                 dev-python/pytest-cov[${PYTHON_USEDEP}]
39                 dev-python/xvfbwrapper[${PYTHON_USEDEP}]
40                 x11-base/xorg-server[xephyr]
41                 x11-apps/xeyes
42                 x11-apps/xcalc
43                 x11-apps/xclock
44         )
45 "
46
47 # display retry backoff slowness and failures
48 RESTRICT="test"
49
50 PATCHES=( "${FILESDIR}"/${PN}-0.12.0-tests.patch )
51
52 python_test() {
53         # force usage of built module
54         rm -rf "${S}"/libqtile || die
55         PYTHONPATH="${BUILD_DIR}/lib" py.test -v "${S}"/test || die "tests failed under ${EPYTHON}"
56 }
57
58 python_install_all() {
59         local DOCS=( CHANGELOG README.rst )
60         distutils-r1_python_install_all
61
62         insinto /usr/share/xsessions
63         doins resources/qtile.desktop
64
65         exeinto /etc/X11/Sessions
66         newexe "${FILESDIR}"/${PN}-session ${PN}
67 }