Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/graphite-web/
Date: Sat, 02 Jul 2022 17:58:34
Message-Id: 1656779939.c3d2fb45629514c2caec1c061ca12b7a8d2ae67e.grobian@gentoo
1 commit: c3d2fb45629514c2caec1c061ca12b7a8d2ae67e
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 2 16:38:07 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 16:38:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d2fb45
7
8 net-analyzer/graphite-web-1.1.10: version bump, support for Python 3.10
9
10 Closes: https://bugs.gentoo.org/846107
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 net-analyzer/graphite-web/Manifest | 1 +
14 .../graphite-web/graphite-web-1.1.10.ebuild | 100 +++++++++++++++++++++
15 2 files changed, 101 insertions(+)
16
17 diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest
18 index d34c717db751..28489bc090a5 100644
19 --- a/net-analyzer/graphite-web/Manifest
20 +++ b/net-analyzer/graphite-web/Manifest
21 @@ -1 +1,2 @@
22 +DIST graphite-web-1.1.10.tar.gz 1192965 BLAKE2B cd60e38a70c124c2be53c12394e994f4772a3fcdbae5fa8f26097e79de3de326ec90d5ee23b4e2e8c696e50d7d7ba897b6bb441a1fc7692d1b6e581c11a3da04 SHA512 fb0a2ed5cfa4a8c12bbb7f64f0c7846b439d8094a0b415e5750fe175bbcc2c047fccad50fdeda7696aee0ed9532eb75948f3a376ee34e188cacf226c02bbb3f9
23 DIST graphite-web-1.1.8.tar.gz 1177214 BLAKE2B 20e058feff0fa7f12393cfd41acca7cf05ff6a3995aa5f6547764fae3b8824e8b424efb8d5d47227eb2b5591ae6b45ab960da30f810acb4f1fbd0b9ae78ec47b SHA512 4637a541e61f56c1ac69bf18e7eab88ecf93f59099dc3e8022d8bf8fb1b204672bc0a1b5302e5031701714db17aabb316ba40f4cfabb2bf4fb0dedb8f412e4a9
24
25 diff --git a/net-analyzer/graphite-web/graphite-web-1.1.10.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.10.ebuild
26 new file mode 100644
27 index 000000000000..ca42298c3bf5
28 --- /dev/null
29 +++ b/net-analyzer/graphite-web/graphite-web-1.1.10.ebuild
30 @@ -0,0 +1,100 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +PYTHON_COMPAT=( python3_{7..10} )
36 +DISTUTILS_USE_SETUPTOOLS=no # export USE_SETUPTOOLS to activate
37 +
38 +inherit distutils-r1 prefix
39 +
40 +DESCRIPTION="Enterprise scalable realtime graphing"
41 +HOMEPAGE="https://graphiteapp.org/"
42 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
43 +
44 +LICENSE="Apache-2.0"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~x86"
47 +IUSE="+carbon ldap mysql memcached postgres +sqlite"
48 +
49 +DEPEND=""
50 +RDEPEND="
51 + carbon? ( dev-python/carbon[${PYTHON_USEDEP}] )
52 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
53 + memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] )
54 + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
55 + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
56 + >=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}]
57 + <dev-python/django-4[sqlite?,${PYTHON_USEDEP}]
58 + >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}]
59 + dev-python/cairocffi[${PYTHON_USEDEP}]
60 + dev-python/pyparsing[${PYTHON_USEDEP}]
61 + dev-python/pytz[${PYTHON_USEDEP}]
62 + dev-python/six[${PYTHON_USEDEP}]
63 + dev-python/urllib3[${PYTHON_USEDEP}]
64 + media-libs/fontconfig
65 +"
66 +
67 +PATCHES=(
68 + # Do not install the configuration and data files. We install them
69 + # somewhere sensible by hand.
70 + "${FILESDIR}"/${PN}-1.1.7-fhs-paths.patch
71 +)
72 +
73 +python_prepare_all() {
74 + # Use a less common name
75 + mv bin/build-index bin/${PN}-build-index || die
76 + # use FHS-style paths
77 + export GRAPHITE_NO_PREFIX=yes
78 + distutils-r1_python_prepare_all
79 + eprefixify \
80 + conf/graphite.wsgi.example \
81 + webapp/graphite/local_settings.py.example
82 +}
83 +
84 +python_install_all() {
85 + distutils-r1_python_install_all
86 + keepdir /var/{lib,log}/${PN}
87 + docinto examples
88 + docompress -x "/usr/share/doc/${PF}/examples"
89 + dodoc \
90 + examples/example-graphite-vhost.conf \
91 + conf/dashboard.conf.example \
92 + conf/graphite.wsgi.example
93 +}
94 +
95 +python_install() {
96 + distutils-r1_python_install \
97 + --install-data="${EPREFIX}"/usr/share/${PN}
98 +
99 + # copy the file once, to keep the timestamps correct, #808863
100 + if [[ ! -e ${ED}/etc/${PN}/local_settings.py ]] ; then
101 + insinto /etc/${PN}
102 + newins webapp/graphite/local_settings.py.example local_settings.py
103 + fi
104 + pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die
105 + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die
106 + popd > /dev/null || die
107 +
108 + python_optimize
109 +}
110 +
111 +pkg_config() {
112 + "${EROOT}"/usr/bin/django-admin.py migrate \
113 + --settings=graphite.settings --run-syncdb
114 + "${EROOT}"/usr/bin/${PN}-build-index
115 +}
116 +
117 +pkg_postinst() {
118 + # Only display this for new installs
119 + if [[ -z ${REPLACING_VERSIONS} ]]; then
120 + elog "You need to configure ${PN} to run with a WSGI server of your choice."
121 + elog "For example using Apache, you can use www-apache/mod_wsgi,"
122 + elog " using Nginx, you can use www-servers/uwsgi."
123 + elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}"
124 + elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html"
125 + elog "Run emerge --config =${PN}-${PVR} if this is a fresh install."
126 + elog ""
127 + elog "If you want to update the search index regularily, you should consider running"
128 + elog "the '${PN}-build-index' script in a crontab."
129 + fi
130 +}