Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/elasticsearch-curator/
Date: Mon, 06 Feb 2017 21:14:08
Message-Id: 1486415624.e9081ed3fc49c8dae02585968d4c811636920c53.gokturk@gentoo
1 commit: e9081ed3fc49c8dae02585968d4c811636920c53
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Sun Jan 29 05:55:19 2017 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 6 21:13:44 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9081ed3
7
8 dev-python/elasticsearch-curator: bump to 4.2.6
9
10 dev-python/elasticsearch-curator/Manifest | 1 +
11 .../elasticsearch-curator-4.2.6.ebuild | 120 +++++++++++++++++++++
12 2 files changed, 121 insertions(+)
13
14 diff --git a/dev-python/elasticsearch-curator/Manifest b/dev-python/elasticsearch-curator/Manifest
15 index fda690d..1c7dfe7 100644
16 --- a/dev-python/elasticsearch-curator/Manifest
17 +++ b/dev-python/elasticsearch-curator/Manifest
18 @@ -2,3 +2,4 @@ DIST elasticsearch-2.4.0.tar.gz 27364449 SHA256 3ae01140ae7bcbb91436feef381fbed7
19 DIST elasticsearch-5.1.2.tar.gz 33299777 SHA256 74d752f9a8b46898d306ad169b72f328e17215c0909149e156a576089ef11c42 SHA512 1867626e8a87f11ed109e1325fd1d16c9e0af06ebe6a30c78ea679ab533ab377f5da8ea55af6871be33af226f02187a2aadd77e5e23c097dd24055be21e9d691 WHIRLPOOL 2e9df71c915343e2cc8ad82c59b877f41f5e093cbeba21f471c32cb51a195eccc6223bc48da48bb4af2e6bea9f2539f2e93b866963148f4ca2940ba4466e614e
20 DIST elasticsearch-curator-4.1.2.tar.gz 130194 SHA256 f4ccc0d49790e0f9390982cc2f0c69ad385361e7840050b6ecba4ef70fa64a0d SHA512 4a465c03baea6b708ce38bbaea8c94a288f91db39fba253a3123af68bce94b1253d22f0d9214fc449a97d55ad468f7f78bf14993c0f5cf18fcf91ebbe1ec57cb WHIRLPOOL 73f8b59f08a6746468336aaac9217a4e37ee15e0deeaf9711d7af79585dfe4e18402d6dceb3feafbafec3e2609dbcc7df983555529640e046336e0bb7421f0d3
21 DIST elasticsearch-curator-4.2.5.tar.gz 227607 SHA256 1a4869fcdbae062dd9777fece8265d5a493dc0e617f152b118955001604de7b8 SHA512 c43b45174098a33e68fedfd298c8377bf7541dafe4d6293311775325fd8ac3152f43fa0ea5beb1f8b459a3d0998167b2232564b2e11df6e1cff28afe0abc3dfc WHIRLPOOL f5176bfab80a8e7f05daf8634a6be984dcf4420615be773d58c74aa3060cb4b7c8052376653c28be7c2c6276251cc296929c35d4537aac46d600d7a0574a10c0
22 +DIST elasticsearch-curator-4.2.6.tar.gz 228342 SHA256 bebc7f6b53a4147e92004dd63d2349bb18170feed12b9219206d0d074b0643ae SHA512 e42d9f3c6122ba9cfc0bc90323f12d7ebf09902d04138472999b63fc59742f2f461b889dd98fca98f321d4975a3c05bc2aae5d211a774abd49b628ea318f5f64 WHIRLPOOL 63eed5c64f3a08f44d6feb8eb56b7698e8081a948b67daae91bb692d69e3ed1166c2fb867cb61f3f114eed74d05251b3aae68a8c475bf75ce318d53435e27b7e
23
24 diff --git a/dev-python/elasticsearch-curator/elasticsearch-curator-4.2.6.ebuild b/dev-python/elasticsearch-curator/elasticsearch-curator-4.2.6.ebuild
25 new file mode 100644
26 index 00000000..6065743
27 --- /dev/null
28 +++ b/dev-python/elasticsearch-curator/elasticsearch-curator-4.2.6.ebuild
29 @@ -0,0 +1,120 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=6
35 +
36 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
37 +
38 +MY_PN="curator"
39 +ES_VERSION="5.1.2"
40 +
41 +inherit distutils-r1
42 +
43 +DESCRIPTION="Tending time-series indices in Elasticsearch"
44 +HOMEPAGE="https://github.com/elasticsearch/curator"
45 +SRC_URI="https://github.com/elasticsearch/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
46 + test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz )"
47 +
48 +LICENSE="Apache-2.0"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE="doc test"
52 +
53 +RDEPEND="
54 + >=dev-python/elasticsearch-py-2.4.0[${PYTHON_USEDEP}]
55 + <dev-python/elasticsearch-py-3.0.0[${PYTHON_USEDEP}]
56 + >=dev-python/click-6.0[${PYTHON_USEDEP}]
57 + >=dev-python/certifi-2017.1.23[${PYTHON_USEDEP}]
58 + >=dev-python/urllib3-1.8.3[${PYTHON_USEDEP}]
59 + >=dev-python/voluptuous-0.9.3[${PYTHON_USEDEP}]"
60 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
61 + dev-python/sphinx[${PYTHON_USEDEP}]
62 + >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
63 + test? ( ${RDEPEND}
64 + virtual/jre:1.8
65 + dev-python/mock[${PYTHON_USEDEP}]
66 + dev-python/nose[${PYTHON_USEDEP}]
67 + dev-python/coverage[${PYTHON_USEDEP}]
68 + dev-python/nosexcover[${PYTHON_USEDEP}]
69 + dev-python/six[${PYTHON_USEDEP}] )"
70 +
71 +S="${WORKDIR}/${MY_PN}-${PV}"
72 +
73 +# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-curator
74 +python_test() {
75 + ES="${WORKDIR}/elasticsearch-${ES_VERSION}"
76 + ES_PORT="25123"
77 + ES_INSTANCE="gentoo-es-curator-test"
78 + ES_LOG="${ES}/logs/${ES_INSTANCE}.log"
79 + PID="${ES}/elasticsearch.pid"
80 +
81 + # run Elasticsearch instance on custom port
82 + sed -i "s/#http.port: 9200/http.port: ${ES_PORT}/g; \
83 + s/#cluster.name: my-application/cluster.name: ${ES_INSTANCE}/g" \
84 + "${ES}/config/elasticsearch.yml" || die
85 +
86 + # start local instance of elasticsearch
87 + "${ES}/bin/elasticsearch" -d -p "${PID}" -Edefault.path.repo=/ || die
88 +
89 + local i
90 + local es_started=0
91 + for i in {1..15}; do
92 + grep -q "started" "${ES_LOG}" 2> /dev/null
93 + if [[ $? -eq 0 ]]; then
94 + einfo "Elasticsearch started"
95 + es_started=1
96 + eend 0
97 + break
98 + elif grep -q 'BindException\[Address already in use\]' "${ES_LOG}" 2>/dev/null; then
99 + eend 1
100 + eerror "Elasticsearch already running"
101 + die "Cannot start Elasticsearch for tests"
102 + else
103 + einfo "Waiting for Elasticsearch"
104 + eend 1
105 + sleep 2
106 + continue
107 + fi
108 + done
109 +
110 + [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
111 +
112 + export TEST_ES_SERVER="localhost:${ES_PORT}"
113 + esetup.py test || die
114 +
115 + pkill -F ${PID}
116 +}
117 +
118 +python_prepare_all() {
119 + # avoid downloading from net
120 + sed -e '/^intersphinx_mapping/,+3d' -i docs/conf.py || die
121 +
122 + # remove test TestCLIFixFor687 as it is only to be run on older versions
123 + # and the call to curator.get_version(global_client) sometimes
124 + # fails with Connection refused
125 + sed -e '122,205d' -i test/integration/test_delete_indices.py || die
126 +
127 + distutils-r1_python_prepare_all
128 +}
129 +
130 +python_compile_all() {
131 + cd docs || die
132 + emake man $(usex doc html "")
133 +}
134 +
135 +python_install_all() {
136 + use doc && local HTML_DOCS=( docs/_build/html/. )
137 + doman docs/_build/man/*
138 + distutils-r1_python_install_all
139 +}
140 +
141 +pkg_postinst() {
142 + ewarn ""
143 + ewarn "For Python 3 support information please read: http://click.pocoo.org/3/python3/"
144 + ewarn ""
145 + ewarn "Example usage on Python 3:"
146 + ewarn "export LC_ALL=en_US.UTF-8"
147 + ewarn "export LANG=en_US.UTF-8"
148 + ewarn "curator ..."
149 +}