1 |
commit: 73a0af305bb3e3b75f50d5b10d087c48848e1e77 |
2 |
Author: Alfred Wingate <parona <AT> protonmail <DOT> com> |
3 |
AuthorDate: Wed Sep 8 21:51:59 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 5 13:37:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73a0af30 |
7 |
|
8 |
dev-python/elasticsearch-py: add 7.14.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
11 |
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/22248 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
dev-python/elasticsearch-py/Manifest | 2 + |
16 |
.../elasticsearch-py-7.14.1.ebuild | 185 +++++++++++++++++++++ |
17 |
dev-python/elasticsearch-py/metadata.xml | 12 +- |
18 |
3 files changed, 198 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/dev-python/elasticsearch-py/Manifest b/dev-python/elasticsearch-py/Manifest |
21 |
index 29efd733d19..8692b365967 100644 |
22 |
--- a/dev-python/elasticsearch-py/Manifest |
23 |
+++ b/dev-python/elasticsearch-py/Manifest |
24 |
@@ -1,2 +1,4 @@ |
25 |
+DIST elasticsearch-7.14.1-no-jdk-linux-x86_64.tar.gz 191559419 BLAKE2B c4099d2e7a121b47549b44c081f60cd966a371a01827aa19380d171619cb6ef6f30fd411f75de00d41c6a93df2c899ac9dbc5cf2bf2264d7885ace6a61cf55c3 SHA512 77dca78ba865ae74863b3b2a3cd61e8a8e4478cd02eb020184dbf89fa32cf145a6bbd1d11a1cb88c2236a3b8cdb8b0047e3c0f1a40f609f31b898c905b2c211d |
26 |
DIST elasticsearch-oss-7.7.0-no-jdk-linux-x86_64.tar.gz 73216528 BLAKE2B f0f1a3d3347ea37703e90bd896b24f6e3c58406d9fb20f3607a4d08eee325b5ae293db48d1afdc208468ee775b9085a28f39f2e175b67e4881bfb61d5cb85a9a SHA512 f9b323cff078a0dc856f99efd164775a9cd0718bb0ddb6c4d4817fa53cae71748f1aec5158afa45d4b29076043cbada9743a996e685439436e93d94a9eff2768 |
27 |
+DIST elasticsearch-py-7.14.1.tar.gz 302277 BLAKE2B a4502edbaf1dbca9c687a32f012305fee7520555dd23f05888fcb8b82e2a9ffa3f9c5208320eca4ea8033498cd0a951003b94662b6847da664f302b8c2763004 SHA512 49b4e0cddc210e0d73cb7cb28f38dae4fd0595e22733cf017c41f50731479a1a3672307a119b067a0b5c1de3a138908e337145effd2b66bf930c2d439cd2ce0b |
28 |
DIST elasticsearch-py-7.7.0.tar.gz 128862 BLAKE2B 461b7ac3bc6d96bacdc1e8595c05b4dfd3e6bad2d2d11eecaedcb3b7e96c7390fe26c47b7095b3b1e8500872cfef689a749bd7103bef352680a2cf3ef7dad350 SHA512 6da382c5056f61dde2bf509c902a4ca33548ee937d037dc977e8c8864ebc09385f630b5c99ab8b24b69390773a241786495d1c01a5684ea3892d834e7a1550b1 |
29 |
|
30 |
diff --git a/dev-python/elasticsearch-py/elasticsearch-py-7.14.1.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-7.14.1.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..9bbee0cf097 |
33 |
--- /dev/null |
34 |
+++ b/dev-python/elasticsearch-py/elasticsearch-py-7.14.1.ebuild |
35 |
@@ -0,0 +1,185 @@ |
36 |
+# Copyright 1999-2021 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python3_{8..10} ) |
42 |
+ |
43 |
+inherit distutils-r1 |
44 |
+ |
45 |
+DESCRIPTION="Official Python low-level client for Elasticsearch" |
46 |
+HOMEPAGE="https://github.com/elastic/elasticsearch-py" |
47 |
+SRC_URI=" |
48 |
+ https://github.com/elastic/elasticsearch-py/archive/v${PV}.tar.gz -> ${P}.tar.gz |
49 |
+ test? ( |
50 |
+ https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${PV}-no-jdk-linux-x86_64.tar.gz |
51 |
+ )" |
52 |
+ |
53 |
+LICENSE="Apache-2.0" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64" |
56 |
+IUSE="async doc test" |
57 |
+ |
58 |
+PROPERTIES="test_network" |
59 |
+RESTRICT="test" |
60 |
+ |
61 |
+RDEPEND=" |
62 |
+ dev-python/certifi[${PYTHON_USEDEP}] |
63 |
+ >=dev-python/urllib3-1.26.0[${PYTHON_USEDEP}] |
64 |
+ <dev-python/urllib3-2.0.0[${PYTHON_USEDEP}] |
65 |
+ async? ( |
66 |
+ >=dev-python/aiohttp-3[${PYTHON_USEDEP}] |
67 |
+ <dev-python/aiohttp-4[${PYTHON_USEDEP}] |
68 |
+ )" |
69 |
+DEPEND=" |
70 |
+ test? ( |
71 |
+ ${RDEPEND} |
72 |
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}] |
73 |
+ <dev-python/requests-3.0.0[${PYTHON_USEDEP}] |
74 |
+ dev-python/mock[${PYTHON_USEDEP}] |
75 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
76 |
+ dev-python/pandas[${PYTHON_USEDEP}] |
77 |
+ dev-python/python-dateutil[${PYTHON_USEDEP}] |
78 |
+ >=dev-python/pyyaml-5.4[${PYTHON_USEDEP}] |
79 |
+ virtual/jre:* |
80 |
+ async? ( |
81 |
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}] |
82 |
+ dev-python/unasync[${PYTHON_USEDEP}] |
83 |
+ ) |
84 |
+ )" |
85 |
+ |
86 |
+distutils_enable_sphinx docs/sphinx dev-python/sphinx_rtd_theme |
87 |
+distutils_enable_tests pytest |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ default_src_prepare |
91 |
+ |
92 |
+ if use test; then |
93 |
+ local es_port="25124" |
94 |
+ |
95 |
+ export ES_DIR="${WORKDIR}/elasticsearch-${PV}" |
96 |
+ export ES_INSTANCE="gentoo-es-py-test" |
97 |
+ export ES_JAVA_HOME=$(java-config -g JAVA_HOME || die) |
98 |
+ export ELASTIC_PASSWORD="changeme" |
99 |
+ export ELASTICSEARCH_URL="https://elastic:${ELASTIC_PASSWORD}@localhost:${es_port}" |
100 |
+ |
101 |
+ cp -r "${S}/.ci/certs" "${ES_DIR}/config" || die |
102 |
+ |
103 |
+ cat <<EOF > "${ES_DIR}/config/elasticsearch.yml" || die |
104 |
+# Run elasticsearch on custom port |
105 |
+http.port: ${es_port} |
106 |
+cluster.routing.allocation.disk.threshold_enabled: false |
107 |
+bootstrap.memory_lock: true |
108 |
+node.attr.testattr: test |
109 |
+repositories.url.allowed_urls: http://snapshot.test* |
110 |
+action.destructive_requires_name: false |
111 |
+ingest.geoip.downloader.enabled: false |
112 |
+ |
113 |
+xpack.license.self_generated.type: basic |
114 |
+xpack.security.enabled: true |
115 |
+xpack.security.http.ssl.enabled: true |
116 |
+xpack.security.http.ssl.verification_mode: certificate |
117 |
+xpack.security.http.ssl.key: certs/testnode.key |
118 |
+xpack.security.http.ssl.certificate: certs/testnode.crt |
119 |
+xpack.security.http.ssl.certificate_authorities: certs/ca.crt |
120 |
+xpack.security.transport.ssl.enabled: true |
121 |
+xpack.security.transport.ssl.verification_mode: certificate |
122 |
+xpack.security.transport.ssl.key: certs/testnode.key |
123 |
+xpack.security.transport.ssl.certificate: certs/testnode.crt |
124 |
+xpack.security.transport.ssl.certificate_authorities: certs/ca.crt |
125 |
+EOF |
126 |
+ |
127 |
+ # Set password in keystore |
128 |
+ printf "y\n${ELASTIC_PASSWORD}\n" | ${ES_DIR}/bin/elasticsearch-keystore add "bootstrap.password" || die |
129 |
+ |
130 |
+ # Deselect tests which require a non-free license in the server to succeed |
131 |
+ EPYTEST_DESELECT+=( |
132 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[token/11_invalidation[{0,1}] |
133 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[token/10_basic[{1..4}] |
134 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_record[{1..6}] |
135 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_influencer[{1..8}] |
136 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/datafeed_cat_apis[0] |
137 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/filter_crud[10] |
138 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/preview_data_frame_analytics[{3..5}] |
139 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/custom_all_field[{0,1}] |
140 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/data_frame_analytics_crud[{1,5,6,13,29,38,39,40,42,62,76,77,78,80,81,82,83}] |
141 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/start_data_frame_analytics[{0,1,2,3,4,6,7,8}] |
142 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_categories[{0,1,2,3,4,5,6,7}] |
143 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/forecast[{1,2,3,4,5,6}] |
144 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/explain_data_frame_analytics[{3,5,6,7,8}] |
145 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/delete_expired_data[{0,1,2,3}] |
146 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/upgrade_job_snapshot[{0,1}] |
147 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/inference_processor[{0,1}] |
148 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_buckets[{0,1,2,3,4,5,6,7,8,9,10,11}] |
149 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/trained_model_cat_apis[0] |
150 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/revert_model_snapshot[{0,1}] |
151 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/calendar_crud[{0,7,8,12,13,17,18}] |
152 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/stop_data_frame_analytics[{0,1,2,3,4,5}] |
153 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get[{0,1,2,3,4}] |
154 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/preview_datafeed[{0,1,2,3,7,8,9}] |
155 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/data_frame_analytics_cat_apis[{0,1,2,3}] |
156 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/reset_job[{0,1}] |
157 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/ml_anomalies_default_mappings[{0,1}] |
158 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/get_model_snapshots[{0,1,2,3,4,5,6,7}] |
159 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/get_datafeeds[{0,1,2,3}] |
160 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/job_cat_apis[0] |
161 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[change_password/11_token[0] |
162 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[searchable_snapshots/10_usage[0] |
163 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[graph/10_basic[0] |
164 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[data_stream/10_data_stream_resolvability[4] |
165 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[xpack/20_info[0] |
166 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[authenticate/10_field_level_security[0] |
167 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[set_security_user/10_small_users_one_index[0] |
168 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[terms_enum/10_basic[{0..9}] |
169 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[security/hidden-index/14_security-tokens-7_read[{0,1,2}] |
170 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[security/hidden-index/13_security-tokens_read[{0,1,2}] |
171 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_records[{0..6}] |
172 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[ml/jobs_get_result_influencers[{0..8}] |
173 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[license/20_put_license[{5,7,8}] |
174 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[license/30_enterprise_license[0] |
175 |
+ test_elasticsearch/test_server/test_rest_api_spec.py::test_rest_api_spec[token/10_basic[0] |
176 |
+ ) |
177 |
+ |
178 |
+ use async || EPYTEST_DESELECT+=( test_elasticsearch/test_async test_elasticsearch/test_types/async_types.py ) |
179 |
+ export EPYTEST_DESELECT |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+python_test() { |
184 |
+ local es_instance="gentoo-py-test" |
185 |
+ local es_log="${ES_DIR}/logs/${es_instance}-${EPYTHON}.log" |
186 |
+ local es_temp="${T}/es_temp-${EPYTHON}" |
187 |
+ local pid="${ES_DIR}/elasticsearch.pid" |
188 |
+ |
189 |
+ mkdir ${es_temp} || die |
190 |
+ |
191 |
+ # start local instance of elasticsearch |
192 |
+ "${ES_DIR}"/bin/elasticsearch -d -p "${pid}" -Ecluster.name=${es_instance}-${EPYTHON} -Epath.repo=${es_temp}|| die |
193 |
+ |
194 |
+ local i |
195 |
+ local es_started=0 |
196 |
+ for i in {1..20}; do |
197 |
+ grep -q "started" ${es_log} 2> /dev/null |
198 |
+ if [[ $? -eq 0 ]]; then |
199 |
+ einfo "Elasticsearch started" |
200 |
+ es_started=1 |
201 |
+ eend 0 |
202 |
+ break |
203 |
+ elif grep -q 'BindException\[Address already in use\]' "${es_log}" 2>/dev/null; then |
204 |
+ eend 1 |
205 |
+ eerror "Elasticsearch already running" |
206 |
+ die "Cannot start Elasticsearch for tests" |
207 |
+ else |
208 |
+ einfo "Waiting for Elasticsearch" |
209 |
+ eend 1 |
210 |
+ sleep 2 |
211 |
+ continue |
212 |
+ fi |
213 |
+ done |
214 |
+ |
215 |
+ [[ $es_started -eq 0 ]] && die "Elasticsearch failed to start" |
216 |
+ |
217 |
+ epytest |
218 |
+ |
219 |
+ pkill -F ${pid} || die |
220 |
+} |
221 |
|
222 |
diff --git a/dev-python/elasticsearch-py/metadata.xml b/dev-python/elasticsearch-py/metadata.xml |
223 |
index dd13b4cb486..94ef681d4bf 100644 |
224 |
--- a/dev-python/elasticsearch-py/metadata.xml |
225 |
+++ b/dev-python/elasticsearch-py/metadata.xml |
226 |
@@ -1,9 +1,19 @@ |
227 |
<?xml version="1.0" encoding="UTF-8"?> |
228 |
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
229 |
<pkgmetadata> |
230 |
- <!-- maintainer-needed --> |
231 |
+ <maintainer type="person" proxied="yes"> |
232 |
+ <email>parona@××××××××××.com</email> |
233 |
+ <name>Alfred Wingate</name> |
234 |
+ </maintainer> |
235 |
+ <maintainer type="project" proxied="proxy"> |
236 |
+ <email>proxy-maint@g.o</email> |
237 |
+ <name>Proxy Maintainers</name> |
238 |
+ </maintainer> |
239 |
<upstream> |
240 |
<remote-id type="github">elastic/elasticsearch-py</remote-id> |
241 |
<remote-id type="pypi">elasticsearch7</remote-id> |
242 |
</upstream> |
243 |
+ <use> |
244 |
+ <flag name="async">Add async support</flag> |
245 |
+ </use> |
246 |
</pkgmetadata> |