1 |
commit: 148e6a7201c1e5f11d0ca66aabf0a75561daff5f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 29 12:16:34 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 29 12:21:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=148e6a72 |
7 |
|
8 |
dev-python/carbon: Switch to PEP 517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/carbon/carbon-1.1.8-r1.ebuild | 62 ++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 62 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/carbon/carbon-1.1.8-r1.ebuild b/dev-python/carbon/carbon-1.1.8-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..599fbc318f06 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/carbon/carbon-1.1.8-r1.ebuild |
20 |
@@ -0,0 +1,62 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} ) |
28 |
+ |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+DESCRIPTION="Backend data caching and persistence daemon for Graphite" |
32 |
+HOMEPAGE="https://graphiteapp.org/" |
33 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
34 |
+ |
35 |
+SLOT="0" |
36 |
+LICENSE="Apache-2.0" |
37 |
+KEYWORDS="~amd64 ~x86" |
38 |
+ |
39 |
+# whisper appears to have been missed from listing in install_requires in setup.py |
40 |
+RDEPEND=" |
41 |
+ dev-python/twisted[${PYTHON_USEDEP}] |
42 |
+ dev-python/cachetools[${PYTHON_USEDEP}] |
43 |
+ dev-python/urllib3[${PYTHON_USEDEP}] |
44 |
+ =dev-python/whisper-${PV}*[${PYTHON_USEDEP}]" |
45 |
+ |
46 |
+python_prepare_all() { |
47 |
+ # Do not install the configuration and data files. We install them |
48 |
+ # somewhere sensible by hand. |
49 |
+ sed -i -e '/data_files=install_files,/d' setup.py || die |
50 |
+ # We want FHS-style paths instead of /opt/graphite |
51 |
+ export GRAPHITE_NO_PREFIX=yes |
52 |
+ distutils-r1_python_prepare_all |
53 |
+} |
54 |
+ |
55 |
+python_install_all() { |
56 |
+ distutils-r1_python_install_all |
57 |
+ |
58 |
+ insinto /etc/carbon |
59 |
+ doins conf/* |
60 |
+ |
61 |
+ keepdir /var/log/carbon /var/lib/carbon/{whisper,lists,rrd} |
62 |
+ |
63 |
+ newinitd "${FILESDIR}"/carbon.initd2 carbon-cache |
64 |
+ newinitd "${FILESDIR}"/carbon.initd2 carbon-relay |
65 |
+ newinitd "${FILESDIR}"/carbon.initd2 carbon-aggregator |
66 |
+ |
67 |
+ newconfd "${FILESDIR}"/carbon.confd carbon-cache |
68 |
+ newconfd "${FILESDIR}"/carbon.confd carbon-relay |
69 |
+ newconfd "${FILESDIR}"/carbon.confd carbon-aggregator |
70 |
+} |
71 |
+ |
72 |
+pkg_postinst() { |
73 |
+ einfo 'This ebuild installs carbon into FHS-style paths.' |
74 |
+ einfo 'You will probably have to set GRAPHITE_CONF_DIR to /etc/carbon' |
75 |
+ einfo 'and GRAPHITE_STORAGE_DIR to /var/lib/carbon to make use of this' |
76 |
+ einfo '(see /etc/carbon/carbon.conf.example).' |
77 |
+ einfo ' ' |
78 |
+ einfo 'OpenRC init script supports multiple instances !' |
79 |
+ einfo 'Example to run an instance b of carbon-cache :' |
80 |
+ einfo ' ln -s /etc/init.d/carbon-cache /etc/init.d/carbon-cache.b' |
81 |
+ einfo ' cp /etc/conf.d/carbon-cache /etc/conf.d/carbon-cache.b' |
82 |
+} |