*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / media-gfx / xdot / xdot-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7} )
6
7 MY_PN=xdot.py
8 EGIT_REPO_URI="https://github.com/jrfonseca/${MY_PN}"
9
10 if [[ ${PV} = 9999* ]]; then
11         GIT_ECLASS="git-r3"
12         SRC_URI=""
13 else
14         KEYWORDS="~amd64 ~x86"
15         MY_P="${MY_PN}-${PV}"
16         S="${WORKDIR}/${MY_P}"
17         SRC_URI="https://github.com/jrfonseca/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
18 fi
19
20 inherit ${GIT_ECLASS} distutils-r1
21
22 DESCRIPTION="Interactive viewer for Graphviz dot files"
23 HOMEPAGE="https://github.com/jrfonseca/xdot.py"
24
25 LICENSE="LGPL-2+"
26 SLOT="0"
27
28 DEPEND="
29         dev-python/pycairo[${PYTHON_USEDEP}]
30         dev-python/pygobject:3[${PYTHON_USEDEP}]
31         dev-python/setuptools[${PYTHON_USEDEP}]
32         media-gfx/graphviz
33 "
34 RDEPEND="${DEPEND}"
35
36 src_unpack() {
37         default
38         [[ $PV = 9999* ]] && git-r3_src_unpack
39 }
40
41 src_prepare() {
42         eapply_user
43
44         # Don't require graphviz python(2) supprt, which xdot doesn't use. This allows xdot to support python3.
45         # For more info, see https://bugs.gentoo.org/643126
46         sed -i "/install_requires=\['graphviz'\],/d" setup.py || die
47 }