1 |
commit: ce4a89b143e9bbccccaae4335c8a58de7d1037f9 |
2 |
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jan 23 12:59:28 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 24 06:54:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce4a89b1 |
7 |
|
8 |
dev-python/elasticsearch-py: bump to 7.1.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
12 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
13 |
|
14 |
dev-python/elasticsearch-py/Manifest | 1 + |
15 |
.../elasticsearch-py/elasticsearch-py-7.1.0.ebuild | 102 +++++++++++++++++++++ |
16 |
2 files changed, 103 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/elasticsearch-py/Manifest b/dev-python/elasticsearch-py/Manifest |
19 |
index 4a8d6a4704a..4eef45fa3c8 100644 |
20 |
--- a/dev-python/elasticsearch-py/Manifest |
21 |
+++ b/dev-python/elasticsearch-py/Manifest |
22 |
@@ -3,3 +3,4 @@ DIST elasticsearch-oss-7.0.1-no-jdk-linux-x86_64.tar.gz 68787752 BLAKE2B 63864de |
23 |
DIST elasticsearch-py-6.3.1.tar.gz 90047 BLAKE2B 765d0a34bd22067e07f4e862eb72f2b67bd0db3516abdf76cdc0d4f24de3db6941b4dbc6afb6315667d640514415cf08ff6de127c84ab36ef9bf062d4e687d55 SHA512 b975a6b446b760bf62289e855768a26b9e104aba9cd399cf275f59f2755efa00bd55c99a746751dad2f7a18f581a1b124c1bb9b91f5c3dc9fb00138c9d198aea |
24 |
DIST elasticsearch-py-6.4.0.tar.gz 97217 BLAKE2B 376768fab9bd7b4efd98f8cc24d4bad700f9bd2f9013a794e28986ee80463e5854399124bfde43a9a43d6773ee5e546fc28077452d2daab6e2e25810c045a986 SHA512 bb9a2fad3ca002b25fa58585cffdadf847a078f72a5b24297d58e1d598103cb38155ff61fd5802be8ccfec96daec3119ecb490f876c07263f103fbf26f6dc6d4 |
25 |
DIST elasticsearch-py-7.0.5.tar.gz 110079 BLAKE2B 89f5f7434fae0c4d20c1780c0979a419278fcaa23f75d5241d48c695905e566742fac5651387f0b1cb665ab6e9cb299406ee7f0157facc8c4cf2c1f1a4a3e5d7 SHA512 c4224cee6f7739ad932036f2afc6ed20ead16829d42f40b79e08d6714b4a247f019175739fb5a93bcea5bba391bd9f54cadcd31d42ff9411da414d08c140049b |
26 |
+DIST elasticsearch-py-7.1.0.tar.gz 110917 BLAKE2B 774db2356b8f75e2b4d739d2c51db22db63326ec6a51c9ee29481d86848b7bb28aaff6e2a43377e7fb2584677417a39d107704391edba350982025859032e54f SHA512 af6dc6f200190e57d37d5c771da6cf9b3cbeee8f4bbffbe0b9466fe88496b9c45d44ef40c2d5379e4fa9cc54ce61c46b35a578e3ae99b82afeacd132bf2c6ad6 |
27 |
|
28 |
diff --git a/dev-python/elasticsearch-py/elasticsearch-py-7.1.0.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-7.1.0.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..efdb3ea2b6d |
31 |
--- /dev/null |
32 |
+++ b/dev-python/elasticsearch-py/elasticsearch-py-7.1.0.ebuild |
33 |
@@ -0,0 +1,102 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{6,7} ) |
40 |
+DISTUTILS_USE_SETUPTOOLS=bdepend |
41 |
+ES_VERSION="7.0.1" |
42 |
+ |
43 |
+inherit distutils-r1 |
44 |
+ |
45 |
+MY_PN=${PN/-py/} |
46 |
+DESCRIPTION="Official Python low-level client for Elasticsearch" |
47 |
+HOMEPAGE="https://github.com/elastic/elasticsearch-py" |
48 |
+SRC_URI="https://github.com/elasticsearch/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
49 |
+ test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-${ES_VERSION}-no-jdk-linux-x86_64.tar.gz )" |
50 |
+ |
51 |
+LICENSE="Apache-2.0" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64 ~x86" |
54 |
+IUSE="doc examples test" |
55 |
+ |
56 |
+# tests fail in chroot |
57 |
+# https://github.com/elastic/elasticsearch/issues/12018 |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+RDEPEND=">=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]" |
61 |
+ |
62 |
+DEPEND="test? ( ${RDEPEND} |
63 |
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}] |
64 |
+ <dev-python/requests-3.0.0[${PYTHON_USEDEP}] |
65 |
+ dev-python/nose[${PYTHON_USEDEP}] |
66 |
+ dev-python/mock[${PYTHON_USEDEP}] |
67 |
+ dev-python/pretty-yaml[${PYTHON_USEDEP}] |
68 |
+ virtual/jre:* )" |
69 |
+ |
70 |
+BDEPEND=">=dev-python/sphinx-1.3.1-r1" |
71 |
+ |
72 |
+python_prepare_all() { |
73 |
+ sed -e '/coverage/d' \ |
74 |
+ -e '/nosexcover/d' \ |
75 |
+ -i setup.py || die |
76 |
+ |
77 |
+ distutils-r1_python_prepare_all |
78 |
+} |
79 |
+ |
80 |
+python_compile_all() { |
81 |
+ emake -C docs -j1 man $(usex doc html "") |
82 |
+} |
83 |
+ |
84 |
+# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-py |
85 |
+python_test() { |
86 |
+ local es="${WORKDIR}/elasticsearch-${ES_VERSION}" |
87 |
+ local es_port="25124" |
88 |
+ local es_instance="gentoo-es-py-test" |
89 |
+ local es_log="${es}/logs/${es_instance}.log" |
90 |
+ local pid="${es}/elasticsearch.pid" |
91 |
+ export JAVA_HOME=$(java-config -g JAVA_HOME) |
92 |
+ |
93 |
+ # run Elasticsearch instance on custom port |
94 |
+ sed -i "s/#http.port: 9200/http.port: ${es_port}/g; \ |
95 |
+ s/#cluster.name: my-application/cluster.name: ${es_instance}/g" \ |
96 |
+ "${es}/config/elasticsearch.yml" || die |
97 |
+ |
98 |
+ # start local instance of elasticsearch |
99 |
+ "${es}"/bin/elasticsearch -d -p "${pid}" -Epath.repo=/ || die |
100 |
+ |
101 |
+ local i |
102 |
+ local es_started=0 |
103 |
+ for i in {1..20}; do |
104 |
+ grep -q "started" ${es_log} 2> /dev/null |
105 |
+ if [[ $? -eq 0 ]]; then |
106 |
+ einfo "Elasticsearch started" |
107 |
+ es_started=1 |
108 |
+ eend 0 |
109 |
+ break |
110 |
+ elif grep -q 'BindException\[Address already in use\]' "${es_log}" 2>/dev/null; then |
111 |
+ eend 1 |
112 |
+ eerror "Elasticsearch already running" |
113 |
+ die "Cannot start Elasticsearch for tests" |
114 |
+ else |
115 |
+ einfo "Waiting for Elasticsearch" |
116 |
+ eend 1 |
117 |
+ sleep 2 |
118 |
+ continue |
119 |
+ fi |
120 |
+ done |
121 |
+ |
122 |
+ [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start" |
123 |
+ |
124 |
+ export TEST_ES_SERVER="localhost:${es_port}" |
125 |
+ nosetests -v || die |
126 |
+ |
127 |
+ pkill -F ${pid} || die |
128 |
+} |
129 |
+ |
130 |
+python_install_all() { |
131 |
+ use doc && HTML_DOCS=( docs/_build/html/. ) |
132 |
+ use examples && dodoc -r example |
133 |
+ doman docs/_build/man/* |
134 |
+ distutils-r1_python_install_all |
135 |
+} |