app-emacs/pymacs: Support newer python
[gentoo.git] / app-emacs / pymacs / pymacs-0.25-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python{2_7,3_4} )
6
7 inherit elisp distutils-r1 vcs-snapshot
8
9 DESCRIPTION="A tool that allows both-side communication beetween Python and Emacs Lisp"
10 HOMEPAGE="http://www.emacswiki.org/emacs/PyMacs"
11 SRC_URI="https://github.com/pinard/Pymacs/tarball/v${PV} -> ${P}.tar.gz"
12
13 LICENSE="GPL-2+"
14 SLOT="0"
15 KEYWORDS="amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
16 IUSE="doc"
17
18 DEPEND="doc? ( >=dev-python/docutils-0.7
19                         virtual/latex-base )"
20 RDEPEND=""
21
22 DISTUTILS_IN_SOURCE_BUILD=1
23 SITEFILE="50${PN}-gentoo.el"
24
25 # called by distutils-r1 for every python implementation
26 python_configure() {
27         # pre-process the files but don't run distutils
28         emake PYSETUP=: PYTHON=${EPYTHON}
29 }
30
31 # called once
32 python_compile_all() {
33         elisp_src_compile
34         if use doc; then
35                 VARTEXFONTS="${T}"/fonts emake RST2LATEX=rst2latex.py pymacs.pdf
36         fi
37 }
38
39 python_install_all() {
40         elisp_src_install
41         distutils-r1_python_install_all
42         dodoc pymacs.rst
43         use doc && dodoc pymacs.pdf
44 }