05815921d5f001d7257bd25e778e464a42f9e700
[gentoo.git] / dev-python / prometheus_flask_exporter / prometheus_flask_exporter-0.4.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{5,6} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Provides HTTP request metrics to export into Prometheus"
10 HOMEPAGE="https://pypi.python.org/pypi/prometheus-flask-exporter https://github.com/rycus86/prometheus_flask_exporter"
11 SRC_URI="https://github.com/rycus86/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~amd64"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-python/flask[${PYTHON_USEDEP}]
21         dev-python/prometheus_client[${PYTHON_USEDEP}]
22 "
23 DEPEND="
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         test? (
26                 ${RDEPEND}
27                 dev-python/pytest[${PYTHON_USEDEP}]
28         )
29 "
30
31 python_test() {
32         pytest -vv || die "Tests failed with ${EPYTHON}"
33 }