aboutsummaryrefslogtreecommitdiff
blob: 69c265482d96346019d254ae7e781bbed0358d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

PYTHON_COMPAT=( python2_7 python3_{3,4} )

inherit latex-package python-r1 git-r3

DESCRIPTION="Fast Access to Python from within LaTeX"
HOMEPAGE="https://github.com/gpoore/pythontex"
SRC_URI=""
EGIT_REPO_URI="https://github.com/gpoore/pythontex.git"

SLOT="0"
LICENSE="LPPL-1.3 BSD"
KEYWORDS=""
IUSE="highlighting"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DEPEND="${PYTHON_DEPS}
	dev-texlive/texlive-latex"
RDEPEND="${DEPEND}
	dev-texlive/texlive-latex
	highlighting? ( dev-python/pygments[${PYTHON_USEDEP}] )"

TEXMF=/usr/share/texmf-site

src_compile() {
	cd ${PN} || die
	ebegin "Compiling ${PN}"
	rm ${PN}.sty || die
	VARTEXFONTS="${T}/fonts" latex ${PN}.ins extra || die
	eend
}

src_install() {
	dodoc ${PN}/README "${S}"/*rst ${PN}_quickstart/*

	cd ${PN} || die

	installation() {
		if python_is_python3; then
			python_domodule {de,}${PN}3.py
		else
			python_domodule {de,}${PN}2.py
		fi
		python_domodule ${PN}_{engines,utils}.py
		python_doscript {de,}${PN}.py syncpdb.py
		python_optimize
	}
	python_foreach_impl installation

	latex-package_src_doinstall dtx ins sty
}