aboutsummaryrefslogtreecommitdiff
blob: c789b2761e841f892ae2f24c1218a37a65ccb034 (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6,7} )
DISTUTILS_USE_SETUPTOOLS=rdepend

inherit distutils-r1

DESCRIPTION="A utility for sending notifications, on demand and when commands finish."
HOMEPAGE="https://github.com/dschep/ntfy"
SRC_URI="https://github.com/dschep/ntfy/archive/v${PV}.tar.gz -> ${P}.tar.gz"

KEYWORDS="~amd64"
LICENSE="GPL-3"
SLOT="0"

IUSE="telegram dbus"

RDEPEND="
	dev-python/appdirs[${PYTHON_USEDEP}]
	dev-python/requests[${PYTHON_USEDEP}]
	dev-python/ruamel-yaml[${PYTHON_USEDEP}]

	dbus? (
		dev-python/dbus-python[${PYTHON_USEDEP}]
		virtual/notification-daemon
	)

	telegram? (
		app-misc/telegram-send[${PYTHON_USEDEP}]
	)
"

DEPEND="${RDEPEND}
	test? (
		dev-python/emoji[${PYTHON_USEDEP}]
		dev-python/mock[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
	)
"

python_prepare_all() {
	# Sleekxmpp no longer in repo
	rm tests/test_xmpp.py  || die
	sed -i -e 's:test_xmpp:_&:' \
		tests/test_integration.py || die

	distutils-r1_python_prepare_all
}

distutils_enable_tests pytest
distutils_enable_sphinx docs