Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/elasticsearch-py/
Date: Wed, 14 Feb 2018 21:55:11
Message-Id: 1518645298.daae6f8e7280058f1040c3087d8a3bd8d5fc171f.mgorny@gentoo
1 commit: daae6f8e7280058f1040c3087d8a3bd8d5fc171f
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Wed Feb 14 13:29:54 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 14 21:54:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daae6f8e
7
8 dev-python/elasticsearch-py: bump to 5.5.2/6.1.1
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-python/elasticsearch-py/Manifest | 4 +
13 .../elasticsearch-py/elasticsearch-py-5.5.2.ebuild | 102 +++++++++++++++++++++
14 .../elasticsearch-py/elasticsearch-py-6.1.1.ebuild | 102 +++++++++++++++++++++
15 3 files changed, 208 insertions(+)
16
17 diff --git a/dev-python/elasticsearch-py/Manifest b/dev-python/elasticsearch-py/Manifest
18 index 149a10b7517..172583c536c 100644
19 --- a/dev-python/elasticsearch-py/Manifest
20 +++ b/dev-python/elasticsearch-py/Manifest
21 @@ -1,6 +1,10 @@
22 DIST elasticsearch-5.3.2.tar.gz 33704368 BLAKE2B 861ca6b37ee71b2a7d3b988287df88620fc88ec6961267c440d1083feadadcf036832f41446135ecb1066c51c3ddd259934562de53b2dad69220a1e4962c3e7c SHA512 430021202fd747ea376e36e9035f05eaa27f06c25f2f8616e218a248f0aeaaffd8577d689c790b618e3fdbcbae23b7bd664d4380d0e323483f6e158675a4bc00
23 DIST elasticsearch-5.6.4.tar.gz 33776770 BLAKE2B c74df8a496c30be315abfd7d1a71f7f8eb75de1a64a7ddd22ff742bd547ec38d417c1ce4002ed6c90b2716837ee0425cf87c910d9f810999e837d118268dcd66 SHA512 37730f39cf1711b6a20861370ef7aff4b48e7f90ad82cb1c8c92643179194c4dcdf0180691d8065304bf61e7f5a2fb1ed5c84c384e0b2ff7ad0dc58ac7352f47
24 +DIST elasticsearch-5.6.7.tar.gz 33789994 BLAKE2B 4e5f4e55cb3875adee7528e26187659b5bac7b2def9d22d438f888fb33ce116654b54859d8430b203c14939bd3821240f8ed209ce120388256e9389ab9acd11c SHA512 2c9fbe8d3ccdced6242b5d876cb9a25a3ef1b94f9de0720aa438458b0235082220621afffe7976664bf08b13b4aee157c28a5d519b5594e6d9d7855c24e93056
25 DIST elasticsearch-6.0.1.tar.gz 28026460 BLAKE2B a70cd36affaccccf1ea552167e585a35cc748de1137cf4b23387798ae31b851104ccc19f8be83ecc645bcebfba344b5e55a397a9cbb0b380c4a118f1f0ffecf2 SHA512 b86a04acd194e7e96e3a32de6ab4983d6569ffb1714f2af9e2b49623004987e13e57c5db055153a188f5d2d7eea63d649fa87769f7625f3fc4923e0cd5b8f3ee
26 +DIST elasticsearch-6.1.3.tar.gz 28454781 BLAKE2B 80c42a64fb533a5b2f0a2c6ea154b129e327acc0d2addc6f1dd5fd949573459ec87118e12b98791642fdfa8e92927d749dd60119adcb398fca56e6e00b0811e2 SHA512 af10cc571ab55f52ab73a86373fa8359214a7866fbb6d2910669e6be897bae30c41c007c3be5803a7f07736041f32cf36425c182a18fab39499321ed9eb4b349
27 DIST elasticsearch-py-5.4.0.tar.gz 81286 BLAKE2B d15ef79ee9720b4ed67c5538c66301aba2c7a4baf9a48faef0153b76dbf780749975d664c8e9d52599077738e543d6c5113bde3748e86f239f1b92a272ea934f SHA512 9d30ffa810f495662769e6d2f2627f9ef6aa3849bc2eecd09df28c05a036b8fb15ae465914c38eeb3d854683bc150a3c56425388312bcd112bd5cc7b33ad41ae
28 DIST elasticsearch-py-5.5.1.tar.gz 83543 BLAKE2B 067fbc15db359c7b58ee9b2a850ac6418415b90cd1847020a5f2379030e87e20bfdc7f90c6c062bf91fe89fa72b81385133dd03bed531fc3b03e4f7bb5ad9f97 SHA512 ac6dbbedaacc1bf3653edeab7c87885cc11682753ed8c51d82109cf24ba0b7ffb36b809eac7cfddd8c5bf37647c2d7c30a129f65748d5795459850e6fa0dd3dd
29 +DIST elasticsearch-py-5.5.2.tar.gz 83415 BLAKE2B 6adf9d5e05c2d097590bc78df9c9a7a948194a4106d718464c04e705380984b51d8f7e04fe9d0eaa6518d6d8767aa064c99512cf827a31e993178ee3c28a8815 SHA512 c5c9583179e87b13c7edf14baeb5a360369f37a953049c3c7e101c379cf895c8fe743d5edaaee6aa0fa4ee6cdab9364c0177097ad780ed3d85ede754088520a3
30 DIST elasticsearch-py-6.0.0.tar.gz 83197 BLAKE2B 5ca16c9b881fe6f8c4944e8eec69be0532fe472564b12dbaa40225b29b8a2b88974e35ed2ab733722023da3ed877a2934bb545387ffdcf307d519950a8971880 SHA512 1d6c27654f9470837e9cb9866cb6f5305d63cac9dc6bddc06309e378a5e7b7fe3d21cae5ffd115685fe8ddcfd8cbbe1457d74799dde0fc7427f90fc870f1c444
31 +DIST elasticsearch-py-6.1.1.tar.gz 83575 BLAKE2B fc7cd690208a401b83fd1b86957dc49b2bd686248f2d78901551c26e67e06f4c7f6175346fd0374ff509477f571a8074ac30aa0e2cca1c73b11b6cdce67bfe33 SHA512 f593865de8879ac42cbbd35dd6bcc1da9513124556dcd3f1d8240e9d2818682136bfac09387c50797f4daada33699a7f5c1591172a7d89c3bd865595a5706c18
32
33 diff --git a/dev-python/elasticsearch-py/elasticsearch-py-5.5.2.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-5.5.2.ebuild
34 new file mode 100644
35 index 00000000000..faeeca4a8d3
36 --- /dev/null
37 +++ b/dev-python/elasticsearch-py/elasticsearch-py-5.5.2.ebuild
38 @@ -0,0 +1,102 @@
39 +# Copyright 1999-2018 Gentoo Foundation
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=6
43 +
44 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
45 +ES_VERSION="5.6.7"
46 +
47 +inherit distutils-r1
48 +
49 +MY_PN=${PN/-py/}
50 +DESCRIPTION="official Python low-level client for Elasticsearch"
51 +HOMEPAGE="https://github.com/elastic/elasticsearch-py"
52 +SRC_URI="https://github.com/elasticsearch/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
53 + test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz )"
54 +
55 +LICENSE="Apache-2.0"
56 +SLOT="0"
57 +KEYWORDS="~amd64 ~x86"
58 +IUSE="examples doc test"
59 +
60 +# tests fail in chroot
61 +# https://github.com/elastic/elasticsearch/issues/12018
62 +RESTRICT="test"
63 +
64 +RDEPEND=">=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]
65 + <dev-python/urllib3-1.23[${PYTHON_USEDEP}]"
66 +
67 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
68 + >=dev-python/sphinx-1.3.1-r1[${PYTHON_USEDEP}]
69 + test? ( ${RDEPEND}
70 + >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
71 + <dev-python/requests-3.0.0[${PYTHON_USEDEP}]
72 + dev-python/nose[${PYTHON_USEDEP}]
73 + dev-python/coverage[${PYTHON_USEDEP}]
74 + dev-python/mock[${PYTHON_USEDEP}]
75 + dev-python/pretty-yaml[${PYTHON_USEDEP}]
76 + dev-python/nosexcover[${PYTHON_USEDEP}]
77 + virtual/jre:1.8 )"
78 +
79 +python_prepare_all() {
80 + # 643684
81 + sed -i -e /urllib3/d setup.py || die
82 +
83 + distutils-r1_python_prepare_all
84 +}
85 +
86 +python_compile_all() {
87 + emake -C docs -j1 man $(usex doc html "")
88 +}
89 +
90 +# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-py
91 +python_test() {
92 + ES="${WORKDIR}/elasticsearch-${ES_VERSION}"
93 + ES_PORT="25124"
94 + ES_INSTANCE="gentoo-es-py-test"
95 + ES_LOG="${ES}/logs/${ES_INSTANCE}.log"
96 + PID="${ES}/elasticsearch.pid"
97 +
98 + # run Elasticsearch instance on custom port
99 + sed -i "s/#http.port: 9200/http.port: ${ES_PORT}/g; \
100 + s/#cluster.name: my-application/cluster.name: ${ES_INSTANCE}/g" \
101 + "${ES}/config/elasticsearch.yml" || die
102 +
103 + # start local instance of elasticsearch
104 + "${ES}"/bin/elasticsearch -d -p "${PID}" -Epath.repo=/ || die
105 +
106 + local i
107 + local es_started=0
108 + for i in {1..20}; do
109 + grep -q "started" ${ES_LOG} 2> /dev/null
110 + if [[ $? -eq 0 ]]; then
111 + einfo "Elasticsearch started"
112 + es_started=1
113 + eend 0
114 + break
115 + elif grep -q 'BindException\[Address already in use\]' "${ES_LOG}" 2>/dev/null; then
116 + eend 1
117 + eerror "Elasticsearch already running"
118 + die "Cannot start Elasticsearch for tests"
119 + else
120 + einfo "Waiting for Elasticsearch"
121 + eend 1
122 + sleep 2
123 + continue
124 + fi
125 + done
126 +
127 + [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
128 +
129 + export TEST_ES_SERVER="localhost:${ES_PORT}"
130 + esetup.py test || die
131 +
132 + pkill -F ${PID}
133 +}
134 +
135 +python_install_all() {
136 + use doc && HTML_DOCS=( docs/_build/html/. )
137 + use examples && dodoc -r example
138 + doman docs/_build/man/*
139 + distutils-r1_python_install_all
140 +}
141
142 diff --git a/dev-python/elasticsearch-py/elasticsearch-py-6.1.1.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-6.1.1.ebuild
143 new file mode 100644
144 index 00000000000..cddd568301b
145 --- /dev/null
146 +++ b/dev-python/elasticsearch-py/elasticsearch-py-6.1.1.ebuild
147 @@ -0,0 +1,102 @@
148 +# Copyright 1999-2018 Gentoo Foundation
149 +# Distributed under the terms of the GNU General Public License v2
150 +
151 +EAPI=6
152 +
153 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
154 +ES_VERSION="6.1.3"
155 +
156 +inherit distutils-r1
157 +
158 +MY_PN=${PN/-py/}
159 +DESCRIPTION="official Python low-level client for Elasticsearch"
160 +HOMEPAGE="https://github.com/elastic/elasticsearch-py"
161 +SRC_URI="https://github.com/elasticsearch/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
162 + test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz )"
163 +
164 +LICENSE="Apache-2.0"
165 +SLOT="0"
166 +KEYWORDS="~amd64 ~x86"
167 +IUSE="examples doc test"
168 +
169 +# tests fail in chroot
170 +# https://github.com/elastic/elasticsearch/issues/12018
171 +RESTRICT="test"
172 +
173 +RDEPEND=">=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]
174 + <dev-python/urllib3-1.23[${PYTHON_USEDEP}]"
175 +
176 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
177 + >=dev-python/sphinx-1.3.1-r1[${PYTHON_USEDEP}]
178 + test? ( ${RDEPEND}
179 + >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
180 + <dev-python/requests-3.0.0[${PYTHON_USEDEP}]
181 + dev-python/nose[${PYTHON_USEDEP}]
182 + dev-python/coverage[${PYTHON_USEDEP}]
183 + dev-python/mock[${PYTHON_USEDEP}]
184 + dev-python/pretty-yaml[${PYTHON_USEDEP}]
185 + dev-python/nosexcover[${PYTHON_USEDEP}]
186 + virtual/jre:1.8 )"
187 +
188 +python_prepare_all() {
189 + # 643684
190 + sed -i -e /urllib3/d setup.py || die
191 +
192 + distutils-r1_python_prepare_all
193 +}
194 +
195 +python_compile_all() {
196 + emake -C docs -j1 man $(usex doc html "")
197 +}
198 +
199 +# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-py
200 +python_test() {
201 + ES="${WORKDIR}/elasticsearch-${ES_VERSION}"
202 + ES_PORT="25124"
203 + ES_INSTANCE="gentoo-es-py-test"
204 + ES_LOG="${ES}/logs/${ES_INSTANCE}.log"
205 + PID="${ES}/elasticsearch.pid"
206 +
207 + # run Elasticsearch instance on custom port
208 + sed -i "s/#http.port: 9200/http.port: ${ES_PORT}/g; \
209 + s/#cluster.name: my-application/cluster.name: ${ES_INSTANCE}/g" \
210 + "${ES}/config/elasticsearch.yml" || die
211 +
212 + # start local instance of elasticsearch
213 + "${ES}"/bin/elasticsearch -d -p "${PID}" -Epath.repo=/ || die
214 +
215 + local i
216 + local es_started=0
217 + for i in {1..20}; do
218 + grep -q "started" ${ES_LOG} 2> /dev/null
219 + if [[ $? -eq 0 ]]; then
220 + einfo "Elasticsearch started"
221 + es_started=1
222 + eend 0
223 + break
224 + elif grep -q 'BindException\[Address already in use\]' "${ES_LOG}" 2>/dev/null; then
225 + eend 1
226 + eerror "Elasticsearch already running"
227 + die "Cannot start Elasticsearch for tests"
228 + else
229 + einfo "Waiting for Elasticsearch"
230 + eend 1
231 + sleep 2
232 + continue
233 + fi
234 + done
235 +
236 + [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
237 +
238 + export TEST_ES_SERVER="localhost:${ES_PORT}"
239 + esetup.py test || die
240 +
241 + pkill -F ${PID}
242 +}
243 +
244 +python_install_all() {
245 + use doc && HTML_DOCS=( docs/_build/html/. )
246 + use examples && dodoc -r example
247 + doman docs/_build/man/*
248 + distutils-r1_python_install_all
249 +}