dev-util/buildbot-prometheus: Drop dependency on pip
authorManuel Rüger <mrueg@gentoo.org>
Fri, 2 Mar 2018 13:14:16 +0000 (14:14 +0100)
committerManuel Rüger <mrueg@gentoo.org>
Fri, 2 Mar 2018 13:14:16 +0000 (14:14 +0100)
Package-Manager: Portage-2.3.24, Repoman-2.3.6

dev-util/buildbot-prometheus/buildbot-prometheus-17.7.2-r1.ebuild [new file with mode: 0644]
dev-util/buildbot-prometheus/buildbot-prometheus-17.7.2.ebuild

diff --git a/dev-util/buildbot-prometheus/buildbot-prometheus-17.7.2-r1.ebuild b/dev-util/buildbot-prometheus/buildbot-prometheus-17.7.2-r1.ebuild
new file mode 100644 (file)
index 0000000..a930624
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} )
+inherit distutils-r1
+
+DESCRIPTION="A Prometheus metrics exporter for Buildbot"
+HOMEPAGE="https://github.com/claws/buildbot-prometheus"
+SRC_URI="https://github.com/claws/buildbot-prometheus/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-python/prometheus_client[${PYTHON_USEDEP}]
+       dev-util/buildbot[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+       ${RDEPEND}"
+
+python_prepare_all() {
+       sed -i -e "/^install_reqs.*$/d" -e "/^from pip.*$/d" -e "s/requires = .*/requires = ['buildbot', 'prometheus_client']/" setup.py || die
+       distutils-r1_python_prepare_all
+}
index e84caf199146c3f4eabf6058514d65ed45d9bfd8..a930624175f30269537e8f30c229785bbd4adf9e 100644 (file)
@@ -18,5 +18,9 @@ IUSE=""
 RDEPEND="dev-python/prometheus_client[${PYTHON_USEDEP}]
        dev-util/buildbot[${PYTHON_USEDEP}]"
 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
-       dev-python/pip[${PYTHON_USEDEP}]
        ${RDEPEND}"
+
+python_prepare_all() {
+       sed -i -e "/^install_reqs.*$/d" -e "/^from pip.*$/d" -e "s/requires = .*/requires = ['buildbot', 'prometheus_client']/" setup.py || die
+       distutils-r1_python_prepare_all
+}