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/, net-analyzer/graphite-web/files/
Date: Sun, 31 May 2020 09:32:51
Message-Id: 1590917550.09be558617aa84cf5b146a95c22d4584ff824f5a.grobian@gentoo
1 commit: 09be558617aa84cf5b146a95c22d4584ff824f5a
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 31 09:32:30 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun May 31 09:32:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09be5586
7
8 net-analyzer/graphite-web-1.1.7: version bump with support for Django 3
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 net-analyzer/graphite-web/Manifest | 1 +
14 ...hs.patch => graphite-web-1.1.7-fhs-paths.patch} | 8 +-
15 .../graphite-web/graphite-web-1.1.7.ebuild | 96 ++++++++++++++++++++++
16 3 files changed, 101 insertions(+), 4 deletions(-)
17
18 diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest
19 index b2a84682aab..7a5d3aca5d0 100644
20 --- a/net-analyzer/graphite-web/Manifest
21 +++ b/net-analyzer/graphite-web/Manifest
22 @@ -1 +1,2 @@
23 DIST graphite-web-1.1.5.tar.gz 1173809 BLAKE2B 94a1b4deab3159d3bde2d3c8b6f9664f39942cb1b815ce042b196be3c0e769ee1acac4b619135e9471360849308b90e02e1df4f7d6b7d0ef31e46d38ee2425e5 SHA512 b2097609ca77a40e6e7d83a3141335e2208d69e7f4edbac8ce3505ed9dd654589836a3b3498bfb7f7585332bceeb8e367f0c10f3cf6afdb5ad6b96377338a7bb
24 +DIST graphite-web-1.1.7.tar.gz 1173818 BLAKE2B e2373360897c1447d60cbf84e5d0dd280130730f617ba12cf0195ed2539f55bcfe8a1cb3b6b9e4f9540a6f08ecb7870072aa61447012baa5553878ebf417937f SHA512 eb0a1de35d3535bd1fdc4e6edc6fe50fd6c8789fef4807eb4cd30d6b20e91e09d21daedb80f55339a8c05325db8fe1038e7a461bf155e41555dee60160d5b241
25
26 diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.3-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch
27 similarity index 92%
28 rename from net-analyzer/graphite-web/files/graphite-web-1.1.3-fhs-paths.patch
29 rename to net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch
30 index aa6ea74ff93..6550f083039 100644
31 --- a/net-analyzer/graphite-web/files/graphite-web-1.1.3-fhs-paths.patch
32 +++ b/net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch
33 @@ -10,17 +10,17 @@ Install FHS-style paths
34 from graphite.wsgi import application
35 --- a/setup.py
36 +++ b/setup.py
37 -@@ -59,8 +59,8 @@
38 +@@ -115,8 +115,8 @@
39 ],
40 package_data={'graphite' :
41 ['templates/*', 'local_settings.py.example']},
42 - scripts=glob('bin/*'),
43 -+ scripts=['bin/graphite-web-build-index'],
44 - data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples,
45 ++ scripts=['bin/graphite-web-build-index'],
46 + data_files=list(webapp_content.items()),
47 - install_requires=['Django>=1.8,<1.11.99', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'],
48 + install_requires=['Django>=1.8,<3.1', 'django-tagging==0.4.3', 'pytz',
49 + 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'],
50 classifiers=[
51 - 'Intended Audience :: Developers',
52 --- a/webapp/graphite/local_settings.py.example
53 +++ b/webapp/graphite/local_settings.py.example
54 @@ -101,6 +101,7 @@
55
56 diff --git a/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild
57 new file mode 100644
58 index 00000000000..74a4e43dac9
59 --- /dev/null
60 +++ b/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild
61 @@ -0,0 +1,96 @@
62 +# Copyright 1999-2020 Gentoo Authors
63 +# Distributed under the terms of the GNU General Public License v2
64 +
65 +EAPI=7
66 +PYTHON_COMPAT=( python3_{6,7} ) # 3.8 dropped due to dep on python-memcached
67 + # 1.1.7 supports up to 3.9, so it's a matter of deps
68 +
69 +inherit distutils-r1 prefix
70 +
71 +DESCRIPTION="Enterprise scalable realtime graphing"
72 +HOMEPAGE="https://graphiteapp.org/"
73 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
74 +
75 +LICENSE="Apache-2.0"
76 +SLOT="0"
77 +KEYWORDS="~amd64 ~x86"
78 +IUSE="+carbon ldap mysql memcached postgres +sqlite"
79 +
80 +DEPEND=""
81 +RDEPEND="
82 + carbon? ( dev-python/carbon[${PYTHON_USEDEP}] )
83 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
84 + memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] )
85 + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
86 + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
87 + >=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}]
88 + >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}]
89 + dev-python/cairocffi[${PYTHON_USEDEP}]
90 + dev-python/pyparsing[${PYTHON_USEDEP}]
91 + dev-python/pytz[${PYTHON_USEDEP}]
92 + dev-python/six[${PYTHON_USEDEP}]
93 + dev-python/urllib3[${PYTHON_USEDEP}]
94 + media-libs/fontconfig
95 +"
96 +
97 +PATCHES=(
98 + # Do not install the configuration and data files. We install them
99 + # somewhere sensible by hand.
100 + "${FILESDIR}"/${PN}-1.1.7-fhs-paths.patch
101 +)
102 +
103 +python_prepare_all() {
104 + # Use a less common name
105 + mv bin/build-index bin/${PN}-build-index || die
106 + # use FHS-style paths
107 + export GRAPHITE_NO_PREFIX=yes
108 + distutils-r1_python_prepare_all
109 + eprefixify \
110 + conf/graphite.wsgi.example \
111 + webapp/graphite/local_settings.py.example
112 +}
113 +
114 +python_install_all() {
115 + distutils-r1_python_install_all
116 + keepdir /var/{lib,log}/${PN}
117 + docinto examples
118 + docompress -x "/usr/share/doc/${PF}/examples"
119 + dodoc \
120 + examples/example-graphite-vhost.conf \
121 + conf/dashboard.conf.example \
122 + conf/graphite.wsgi.example
123 +}
124 +
125 +python_install() {
126 + distutils-r1_python_install \
127 + --install-data="${EPREFIX}"/usr/share/${PN}
128 +
129 + insinto /etc/${PN}
130 + newins webapp/graphite/local_settings.py.example local_settings.py
131 + pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die
132 + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die
133 + popd > /dev/null || die
134 +
135 + python_optimize
136 +}
137 +
138 +pkg_config() {
139 + "${EROOT}"/usr/bin/django-admin.py migrate \
140 + --settings=graphite.settings --run-syncdb
141 + "${EROOT}"/usr/bin/${PN}-build-index
142 +}
143 +
144 +pkg_postinst() {
145 + # Only display this for new installs
146 + if [[ -z ${REPLACING_VERSIONS} ]]; then
147 + elog "You need to configure ${PN} to run with a WSGI server of your choice."
148 + elog "For example using Apache, you can use www-apache/mod_wsgi,"
149 + elog " using Nginx, you can use www-servers/uwsgi."
150 + elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}"
151 + elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html"
152 + elog "Run emerge --config =${PN}-${PVR} if this is a fresh install."
153 + elog ""
154 + elog "If you want to update the search index regularily, you should consider running"
155 + elog "the '${PN}-build-index' script in a crontab."
156 + fi
157 +}