*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / urwidtrees / urwidtrees-1.0.2-r1.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=( python{2_7,3_6,3_7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Tree widgets for urwid"
10 HOMEPAGE="https://github.com/pazz/urwidtrees"
11 SRC_URI="https://github.com/pazz/urwidtrees/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc"
17
18 DEPEND="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
19 RDEPEND=">=dev-python/urwid-1.1.0[${PYTHON_USEDEP}]"
20
21 src_prepare() {
22         find -name '*.py' -exec \
23                 sed -i -e '1i# -*- coding: utf-8 -*-' {} + || die
24
25         distutils-r1_src_prepare
26
27         local md
28         for md in *.md; do
29                 mv "${md}" "${md%.md}" || die
30         done
31 }
32
33 src_compile() {
34         distutils-r1_src_compile
35
36         use doc && emake -C docs html
37 }
38
39 src_install() {
40         distutils-r1_src_install
41
42         if use doc; then
43                 dodoc -r docs/build/html/.
44         fi
45 }