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: Fri, 28 Sep 2018 10:46:03
Message-Id: 1538131554.349323c4735afd6b6928f2662c2bec47b6ee361c.mgorny@gentoo
1 commit: 349323c4735afd6b6928f2662c2bec47b6ee361c
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 20 11:12:59 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 28 10:45:54 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=349323c4
7
8 dev-python/elasticsearch-py: drop old
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Package-Manager: Portage-2.3.49, Repoman-2.3.10
12 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
13 Closes: https://github.com/gentoo/gentoo/pull/9927
14
15 .../elasticsearch-py/elasticsearch-py-6.3.1.ebuild | 102 ---------------------
16 1 file changed, 102 deletions(-)
17
18 diff --git a/dev-python/elasticsearch-py/elasticsearch-py-6.3.1.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-6.3.1.ebuild
19 deleted file mode 100644
20 index 966afedf7a0..00000000000
21 --- a/dev-python/elasticsearch-py/elasticsearch-py-6.3.1.ebuild
22 +++ /dev/null
23 @@ -1,102 +0,0 @@
24 -# Copyright 1999-2018 Gentoo Foundation
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -EAPI=7
28 -
29 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
30 -ES_VERSION="6.4.0"
31 -
32 -inherit distutils-r1
33 -
34 -MY_PN=${PN/-py/}
35 -DESCRIPTION="official Python low-level client for Elasticsearch"
36 -HOMEPAGE="https://github.com/elastic/elasticsearch-py"
37 -SRC_URI="https://github.com/elasticsearch/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
38 - test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-${ES_VERSION}.tar.gz )"
39 -
40 -LICENSE="Apache-2.0"
41 -SLOT="0"
42 -KEYWORDS="~amd64 ~x86"
43 -IUSE="examples doc test"
44 -
45 -# tests fail in chroot
46 -# https://github.com/elastic/elasticsearch/issues/12018
47 -RESTRICT="test"
48 -
49 -RDEPEND=">=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]
50 - <dev-python/urllib3-1.23[${PYTHON_USEDEP}]"
51 -
52 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
53 - >=dev-python/sphinx-1.3.1-r1[${PYTHON_USEDEP}]
54 - test? ( ${RDEPEND}
55 - >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
56 - <dev-python/requests-3.0.0[${PYTHON_USEDEP}]
57 - dev-python/nose[${PYTHON_USEDEP}]
58 - dev-python/coverage[${PYTHON_USEDEP}]
59 - dev-python/mock[${PYTHON_USEDEP}]
60 - dev-python/pretty-yaml[${PYTHON_USEDEP}]
61 - dev-python/nosexcover[${PYTHON_USEDEP}]
62 - virtual/jre:1.8 )"
63 -
64 -python_prepare_all() {
65 - # 643684
66 - sed -i -e /urllib3/d setup.py || die
67 -
68 - distutils-r1_python_prepare_all
69 -}
70 -
71 -python_compile_all() {
72 - emake -C docs -j1 man $(usex doc html "")
73 -}
74 -
75 -# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-py
76 -python_test() {
77 - ES="${WORKDIR}/elasticsearch-${ES_VERSION}"
78 - ES_PORT="25124"
79 - ES_INSTANCE="gentoo-es-py-test"
80 - ES_LOG="${ES}/logs/${ES_INSTANCE}.log"
81 - PID="${ES}/elasticsearch.pid"
82 -
83 - # run Elasticsearch instance on custom port
84 - sed -i "s/#http.port: 9200/http.port: ${ES_PORT}/g; \
85 - s/#cluster.name: my-application/cluster.name: ${ES_INSTANCE}/g" \
86 - "${ES}/config/elasticsearch.yml" || die
87 -
88 - # start local instance of elasticsearch
89 - "${ES}"/bin/elasticsearch -d -p "${PID}" -Epath.repo=/ || die
90 -
91 - local i
92 - local es_started=0
93 - for i in {1..20}; do
94 - grep -q "started" ${ES_LOG} 2> /dev/null
95 - if [[ $? -eq 0 ]]; then
96 - einfo "Elasticsearch started"
97 - es_started=1
98 - eend 0
99 - break
100 - elif grep -q 'BindException\[Address already in use\]' "${ES_LOG}" 2>/dev/null; then
101 - eend 1
102 - eerror "Elasticsearch already running"
103 - die "Cannot start Elasticsearch for tests"
104 - else
105 - einfo "Waiting for Elasticsearch"
106 - eend 1
107 - sleep 2
108 - continue
109 - fi
110 - done
111 -
112 - [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
113 -
114 - export TEST_ES_SERVER="localhost:${ES_PORT}"
115 - esetup.py test || die
116 -
117 - pkill -F ${PID}
118 -}
119 -
120 -python_install_all() {
121 - use doc && HTML_DOCS=( docs/_build/html/. )
122 - use examples && dodoc -r example
123 - doman docs/_build/man/*
124 - distutils-r1_python_install_all
125 -}