summaryrefslogtreecommitdiff
blob: 9e0ed53eda37385ffb1a868673d49e90aefbe7e9 (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
58
59
60
61
62
63
64
65
66
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# NOTICE: Check package version in "lisp/ein-pkg.el".
# NOTICE: File "lisp/ein-pkg.el" is needed by the "ein:dev-sys-info" function.

EAPI=8

H=388c8f753cfb99b4f82acbdff26bbe27189d2299
NEED_EMACS=25

inherit elisp readme.gentoo-r1

DESCRIPTION="Jupyter notebook client in Emacs"
HOMEPAGE="https://github.com/millejoh/emacs-ipython-notebook/"
SRC_URI="https://github.com/millejoh/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/${PN}-${H}

LICENSE="GPL-3+"
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
	app-emacs/anaphora
	app-emacs/dash
	app-emacs/deferred
	app-emacs/polymode
	app-emacs/request
	app-emacs/websocket
	app-emacs/with-editor
	dev-python/ipython
	dev-python/notebook
	www-servers/tornado
"
BDEPEND="
	${RDEPEND}
	test? ( app-emacs/ert-runner )
"

DOCS=( README.rst thumbnail.png )
DOC_CONTENTS="There may be problems with connecting to Jupyter Notebooks
	because of the tokens, in that case you can try running	\"jupyter
	notebook\" with --NotebookApp.token=\"\" (and --NotebookApp.ip=127.0.0.1 to
	limit connections only to local machine), but be warned that this can
	compromise your system if used without caution! For reference check out
	https://github.com/millejoh/emacs-ipython-notebook/issues/838"

SITEFILE="50${PN}-gentoo.el"

src_compile() {
	BYTECOMPFLAGS="-L lisp" elisp-compile lisp/*.el
}

src_test() {
	ert-runner -L lisp -L test -l test/testein.el \
			   --reporter ert+duration test/test-ein*.el || die
}

src_install() {
	elisp-install ${PN} lisp/*.el{,c}
	elisp-site-file-install "${FILESDIR}/${SITEFILE}"

	readme.gentoo_create_doc
}