*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pyx / pyx-0.12.1-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python2_7 )
6
7 inherit distutils-r1
8
9 MY_P="${P/pyx/PyX}"
10
11 DESCRIPTION="Python package for the generation of encapsulated PostScript figures"
12 HOMEPAGE="https://pyx.sourceforge.net/
13         https://pypi.org/project/PyX/"
14 SRC_URI="mirror://sourceforge/pyx/${MY_P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
19 IUSE="doc"
20
21 RDEPEND="virtual/tex-base
22                 dev-texlive/texlive-basic"
23
24 DEPEND="${RDEPEND}
25         doc? ( virtual/latex-base
26                 dev-python/sphinx[latex,${PYTHON_USEDEP}] )"
27
28 S="${WORKDIR}/${MY_P}"
29
30 src_prepare() {
31         distutils-r1_src_prepare
32         sed -i \
33                 -e 's/^build_t1code=.*/build_t1code=1/' \
34                 -e 's/^build_pykpathsea=.*/build_pykpathsea=1/' \
35                 setup.cfg || die "setup.cfg fix failed"
36 }
37
38 python_compile_all() {
39         if use doc; then
40                 VARTEXFONTS="${T}"/fonts emake -C "${S}"/faq latexpdf
41         fi
42 }
43
44 python_install_all() {
45         use doc && dodoc faq/_build/latex/pyxfaq.pdf
46         distutils-r1_python_install_all
47 }