Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/elasticsearch-curator/
Date: Sat, 08 Jul 2017 21:36:02
Message-Id: 1499549753.a04e4968fe3914b633d092cd2163165007db6614.monsieurp@gentoo
1 commit: a04e4968fe3914b633d092cd2163165007db6614
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Jul 4 18:25:50 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 8 21:35:53 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a04e4968
7
8 dev-python/elasticsearch-curator: version bump to 5.1.1.
9
10 Closes: https://github.com/gentoo/gentoo/pull/5042
11
12 dev-python/elasticsearch-curator/Manifest | 1 +
13 .../elasticsearch-curator-5.1.1.ebuild | 120 +++++++++++++++++++++
14 2 files changed, 121 insertions(+)
15
16 diff --git a/dev-python/elasticsearch-curator/Manifest b/dev-python/elasticsearch-curator/Manifest
17 index 1985c43e9b0..fe6fd2440d6 100644
18 --- a/dev-python/elasticsearch-curator/Manifest
19 +++ b/dev-python/elasticsearch-curator/Manifest
20 @@ -3,3 +3,4 @@ DIST elasticsearch-5.3.2.tar.gz 33704368 SHA256 a94fe46bc90eb271a0d448d20e49cb02
21 DIST elasticsearch-curator-4.2.6.tar.gz 228342 SHA256 bebc7f6b53a4147e92004dd63d2349bb18170feed12b9219206d0d074b0643ae SHA512 e42d9f3c6122ba9cfc0bc90323f12d7ebf09902d04138472999b63fc59742f2f461b889dd98fca98f321d4975a3c05bc2aae5d211a774abd49b628ea318f5f64 WHIRLPOOL 63eed5c64f3a08f44d6feb8eb56b7698e8081a948b67daae91bb692d69e3ed1166c2fb867cb61f3f114eed74d05251b3aae68a8c475bf75ce318d53435e27b7e
22 DIST elasticsearch-curator-4.3.1.tar.gz 232546 SHA256 93601c39ec9acf05b9dca1ba58357af32c468d7429ea2f7be37d1b4045eb3b08 SHA512 24bfbcff4a5f3b7f2dbbda147eee79e74eec29187e4bb4d97475bca1a25e127570323ae00e03511ee6c1ea797973fc11b3bee25ffd2089fa0c7ae626f66a6153 WHIRLPOOL c3a548de20903139f10e51f0c273f4c028d7e54e862db442be65025d7d8b623ba93b6a575b3f5eeb174e8a1aa06c4269f24cf3bad7f134b506b00ba2fdf2d766
23 DIST elasticsearch-curator-5.0.4.tar.gz 264754 SHA256 109aa8ba12ed68b5e9121138cbbdbae2f58eef5fd310099e3b8843ca5cc1cfc9 SHA512 79392a91e1bcbac79c40b75f782a1d57f7e24c849e4e7b302a47f5bcc84e9f656b30c64aa6eb51da9f92e6e021862411beb345da88248288b28c95d751d757cf WHIRLPOOL 0f881013053458804694f1d8e00052566a41af2905d7cddd2b2a2bb4fb6c27cab77e66f85f0c9fa7f6261399b41273072ce1b8d116d706a7bd53bb4b37639fd2
24 +DIST elasticsearch-curator-5.1.1.tar.gz 268629 SHA256 35064a6acaf35dacd9ac21b8ad78782640a0a7b77f684c7a6bf5db2f513b374f SHA512 f5977984a0997fdcbf0e9ea338118e90a7e519d7252e1ac5d2c1484d553352ec95495f6dc50efe1b09282b3c8309d8c3712c49bbceabe53cc97c007efd90ec4b WHIRLPOOL 335b66e97cd650498d2a1dd9a4a4761311b33f9367bba9f161dd0c5cdb3357a7822595e7630cec2f3a8ab5bb5c4aa1f849ea60f0bc4b706c2603814ee0e6cec6
25
26 diff --git a/dev-python/elasticsearch-curator/elasticsearch-curator-5.1.1.ebuild b/dev-python/elasticsearch-curator/elasticsearch-curator-5.1.1.ebuild
27 new file mode 100644
28 index 00000000000..2d016470e11
29 --- /dev/null
30 +++ b/dev-python/elasticsearch-curator/elasticsearch-curator-5.1.1.ebuild
31 @@ -0,0 +1,120 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
38 +
39 +MY_PN="curator"
40 +ES_VERSION="5.3.2"
41 +
42 +# tests fail in chroot
43 +# https://github.com/elastic/elasticsearch/issues/12018
44 +RESTRICT="test"
45 +
46 +# running tests in non-chroot environments:
47 +# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-curator
48 +
49 +inherit distutils-r1
50 +
51 +DESCRIPTION="Tending time-series indices in Elasticsearch"
52 +HOMEPAGE="https://github.com/elasticsearch/curator"
53 +SRC_URI="https://github.com/elasticsearch/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
54 + test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz )"
55 +
56 +LICENSE="Apache-2.0"
57 +SLOT="0"
58 +KEYWORDS="~amd64 ~x86"
59 +IUSE="doc test"
60 +
61 +RDEPEND="
62 + >=dev-python/elasticsearch-py-5.4.0[${PYTHON_USEDEP}]
63 + <dev-python/elasticsearch-py-6.0.0[${PYTHON_USEDEP}]
64 + >=dev-python/click-6.7[${PYTHON_USEDEP}]
65 + >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
66 + >=dev-python/urllib3-1.20[${PYTHON_USEDEP}]
67 + >=dev-python/voluptuous-0.9.3[${PYTHON_USEDEP}]"
68 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
69 + dev-python/sphinx[${PYTHON_USEDEP}]
70 + >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
71 + test? ( ${RDEPEND}
72 + virtual/jre:1.8
73 + dev-python/mock[${PYTHON_USEDEP}]
74 + dev-python/nose[${PYTHON_USEDEP}]
75 + dev-python/coverage[${PYTHON_USEDEP}]
76 + dev-python/nosexcover[${PYTHON_USEDEP}]
77 + dev-python/six[${PYTHON_USEDEP}] )"
78 +
79 +S="${WORKDIR}/${MY_PN}-${PV}"
80 +
81 +python_test() {
82 + ES="${WORKDIR}/elasticsearch-${ES_VERSION}"
83 + ES_PORT="25123"
84 + ES_INSTANCE="gentoo-es-curator-test"
85 + ES_LOG="${ES}/logs/${ES_INSTANCE}.log"
86 + PID="${ES}/elasticsearch.pid"
87 +
88 + # run Elasticsearch instance on custom port
89 + sed -i "s/#http.port: 9200/http.port: ${ES_PORT}/g; \
90 + s/#cluster.name: my-application/cluster.name: ${ES_INSTANCE}/g" \
91 + "${ES}/config/elasticsearch.yml" || die
92 +
93 + # start local instance of elasticsearch
94 + "${ES}/bin/elasticsearch" -d -p "${PID}" -Edefault.path.repo=/ || die
95 +
96 + local i
97 + local es_started=0
98 + for i in {1..20}; do
99 + grep -q "started" "${ES_LOG}" 2> /dev/null
100 + if [[ $? -eq 0 ]]; then
101 + einfo "Elasticsearch started"
102 + es_started=1
103 + eend 0
104 + break
105 + elif grep -q 'BindException\[Address already in use\]' "${ES_LOG}" 2>/dev/null; then
106 + eend 1
107 + eerror "Elasticsearch already running"
108 + die "Cannot start Elasticsearch for tests"
109 + else
110 + einfo "Waiting for Elasticsearch"
111 + eend 1
112 + sleep 2
113 + continue
114 + fi
115 + done
116 +
117 + [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
118 +
119 + export TEST_ES_SERVER="localhost:${ES_PORT}"
120 + esetup.py test || die
121 +
122 + pkill -F ${PID}
123 +}
124 +
125 +python_prepare_all() {
126 + # avoid downloading from net
127 + sed -e '/^intersphinx_mapping/,+3d' -i docs/conf.py || die
128 +
129 + distutils-r1_python_prepare_all
130 +}
131 +
132 +python_compile_all() {
133 + cd docs || die
134 + emake man $(usex doc html "")
135 +}
136 +
137 +python_install_all() {
138 + use doc && local HTML_DOCS=( docs/_build/html/. )
139 + doman docs/_build/man/*
140 + distutils-r1_python_install_all
141 +}
142 +
143 +pkg_postinst() {
144 + ewarn ""
145 + ewarn "For Python 3 support information please read: http://click.pocoo.org/3/python3/"
146 + ewarn ""
147 + ewarn "Example usage on Python 3:"
148 + ewarn "export LC_ALL=en_US.UTF-8"
149 + ewarn "export LANG=en_US.UTF-8"
150 + ewarn "curator ..."
151 +}