310410cfb01ecfc93b71272ac7577805975065aa
[gentoo.git] / app-emacs / pymacs / pymacs-0.26-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=( python2_7 python3_{6,7,8} )
6
7 inherit elisp distutils-r1
8
9 DESCRIPTION="A tool that allows both-side communication beetween Python and Emacs Lisp"
10 HOMEPAGE="https://www.emacswiki.org/emacs/PyMacs"
11 SRC_URI="https://github.com/dgentry/${PN^}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-2+"
14 SLOT="0"
15 KEYWORDS="amd64 arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
16 IUSE="doc"
17
18 BDEPEND="doc? (
19                 >=dev-python/docutils-0.7
20                 virtual/latex-base
21         )"
22
23 S="${WORKDIR}/${P^}"
24 DISTUTILS_IN_SOURCE_BUILD=1
25 DISTUTILS_USE_SETUPTOOLS="no"
26 SITEFILE="50${PN}-gentoo.el"
27
28 # called by distutils-r1 for every python implementation
29 python_configure() {
30         # pre-process the files but don't run distutils
31         emake PYSETUP=: PYTHON=${EPYTHON}
32 }
33
34 # called once
35 python_compile_all() {
36         elisp_src_compile
37         if use doc; then
38                 VARTEXFONTS="${T}"/fonts emake RST2LATEX=rst2latex.py pymacs.pdf
39         fi
40 }
41
42 python_install_all() {
43         elisp_src_install
44         distutils-r1_python_install_all
45         dodoc pymacs.rst
46         use doc && dodoc pymacs.pdf
47 }