summaryrefslogtreecommitdiff
path: root/dev-python/elasticsearch-py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-02 23:23:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-02 23:23:40 +0100
commitf20958f66a5e97c92cc44354e07e3e3089dfc23d (patch)
treefbf2993fb14c0f373d35922030b711e3fda4f864 /dev-python/elasticsearch-py
parente805507c58bab294dddb75f6fc9b551d9d92de86 (diff)
gentoo auto-resync : 02:05:2023 - 23:23:39
Diffstat (limited to 'dev-python/elasticsearch-py')
-rw-r--r--dev-python/elasticsearch-py/Manifest7
-rw-r--r--dev-python/elasticsearch-py/elasticsearch-py-8.6.2.ebuild13
-rw-r--r--dev-python/elasticsearch-py/elasticsearch-py-8.7.0.ebuild139
-rw-r--r--dev-python/elasticsearch-py/metadata.xml2
4 files changed, 146 insertions, 15 deletions
diff --git a/dev-python/elasticsearch-py/Manifest b/dev-python/elasticsearch-py/Manifest
index 090b884f3cb5..0773dad2d6e2 100644
--- a/dev-python/elasticsearch-py/Manifest
+++ b/dev-python/elasticsearch-py/Manifest
@@ -1,4 +1,7 @@
DIST elasticsearch-8.6.2-linux-x86_64.tar.gz 581745209 BLAKE2B c5d76e8fd2b7b28d50a0b81950c5d824f5000d3239efef9c3312e153829f09d98ba1394dceff2f147c29e2cd24be2ea4aaf0e0dc830e51989b87c8c7b48e3b3c SHA512 4c5ea98af53861d6c7f06f855f3bd4f4f52136d8149347e43f633a23ba56d3237f6ff7346bf849090f4e52b28fc21c98df8d9b0f0f845a330834367705cd366a
+DIST elasticsearch-8.7.0-linux-x86_64.tar.gz 596104472 BLAKE2B bf2d6d6f810abd6e586681882f7eb01728167c6fd56ff927b08388bc3f4f5d342f0d903db1306880d70efc27c1ed7c53ba25d9517c55f4fa228744fdb7e3695b SHA512 7ac6ee5e2e2ccee1ebb20a1c94992b90e879b8b37273d59ae1496b1e8ae5499ae1b6ddce8cea7dda3b63e7e45352735b2bd3328ad0fdd6d6aadb020de21eb894
DIST elasticsearch-py-8.6.2.gh.tar.gz 517674 BLAKE2B c498f1e1efaea4c24f595f7e496f576372d6075da107b2f84a7d4a42c02de4e00d1459df6f965384f5880b4d8f910c4a7a49a773cb38361618ca7a74e5c4ec5a SHA512 53c03c9c8da4eb303e8f9cd5752bbef5a360d1e1a6fea4e98a8d576299f2ae4175c1da09429049cedf53a78bf86a4647fe4f4f9c7735a5a29977ada7db49e5fb
-EBUILD elasticsearch-py-8.6.2.ebuild 4846 BLAKE2B 8ae2c02f8a3a0afac8f282df673d2f5e8e35baad2f99c207ada9b2239f7f333b0f3331c94e01883f5e6d42a6eaf02b0ede00cdfb725af0d377f5ddd43f8614f0 SHA512 d2beccbec9786ac1f4ec257b45c50da4814b71f3c01a07f1e6b87c933e39f8c29d17f764e3b90e12b09979071f351c64be1067d878a85c9379494814c7ce676d
-MISC metadata.xml 540 BLAKE2B c44bd89e7a0e35b3ee5bc0a5899f32ed6309744a4c78bf63e5e0a78f073adec776cec810aff6757d4cf70381b954ddf0b7aed5420b5b085846f27b26ff7240cb SHA512 3f73bb387d67a7fd55271819d75f024e6ffdcb601542a779855b95f44cdb9e78b77d6fb059c69969e135caea7d1db2ed8a4ca2786c78faab5f8574973e2f02f9
+DIST elasticsearch-py-8.7.0.gh.tar.gz 523141 BLAKE2B bbc6c59e921c5e8db3b7815a3086abe42690733d6719dcf3e167a521b1e7b38e68bf29ff2b1e0e48839be36c11feb9cb5bd9da507c35f508063ccfe9f3c24c59 SHA512 8f28d51cde600069692c8bef810e7949165a5f7a3ec440513a5f69e5c392ecb928dbd0317a9424d1845f523230a421e7d53db41a03b1bd3cc232c4b04ee0c894
+EBUILD elasticsearch-py-8.6.2.ebuild 4273 BLAKE2B 1e006266e0925dc456e7bb55a61bc27cc0dd0e80808d65936a8063e6a7b3ae33d6802d941df070e1a6d15e66647f06e73549a486da070053010d195e5123cb76 SHA512 28be9efe0dff0c0045af802dae8bb0cf77478c6eb60e107d59613ac0608b3f5bd89725a9738d14f9cd04e8ce2baa3859a1637620cd5187a2218630fd617b8207
+EBUILD elasticsearch-py-8.7.0.ebuild 4275 BLAKE2B c3872d6b7a21fc0834c8850ede2976e97618df6119c73be96d6c1d3cc69681f04c4cde4568bdc2875a07f890d0fd64b72d0cb00f506d51dc1db4f7681b3a9d0f SHA512 05a9e647b382f54ba56845b95b56e502c46d4d6e9b504b81d972d4aa63aaf3f66a988c783e18b608dc2cc170f45c9e760656864b9b19ba33dde4417df423c00b
+MISC metadata.xml 539 BLAKE2B b15f1ab67ea9d0f0d9c3f980751c01196eac3a7b33c14425710d061112c5cb58c5b9c3c5a9b45f6b40189f58a6f708afc5d038c374ac679b5b4c485a60333c12 SHA512 b8730bb4338ea38108cca19919cbd2f2e03ffa0db9c7f8070bf04053ffdebc7fdebcf6460d10f5fed29e6f317f88854bca1a7c5fdb194d643cb8124848668e14
diff --git a/dev-python/elasticsearch-py/elasticsearch-py-8.6.2.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-8.6.2.ebuild
index 9ac55cbfa46b..f39c589bce66 100644
--- a/dev-python/elasticsearch-py/elasticsearch-py-8.6.2.ebuild
+++ b/dev-python/elasticsearch-py/elasticsearch-py-8.6.2.ebuild
@@ -81,8 +81,6 @@ src_test() {
# So lets add a reasonable limit
export ES_JAVA_OPTS="-Xmx4g"
- cp -r "${S}/.ci/certs" "${ES_DIR}/config" || die
-
cat > "${ES_DIR}/config/elasticsearch.yml" <<-EOF || die
# Run elasticsearch on custom port
http.port: ${es_port}
@@ -95,16 +93,7 @@ src_test() {
xpack.license.self_generated.type: basic
xpack.security.enabled: true
- xpack.security.http.ssl.enabled: true
- xpack.security.http.ssl.verification_mode: certificate
- xpack.security.http.ssl.key: certs/testnode.key
- xpack.security.http.ssl.certificate: certs/testnode.crt
- xpack.security.http.ssl.certificate_authorities: certs/ca.crt
- xpack.security.transport.ssl.enabled: true
- xpack.security.transport.ssl.verification_mode: certificate
- xpack.security.transport.ssl.key: certs/testnode.key
- xpack.security.transport.ssl.certificate: certs/testnode.crt
- xpack.security.transport.ssl.certificate_authorities: certs/ca.crt
+ xpack.security.http.ssl.enabled: false
EOF
# Set password in keystore
diff --git a/dev-python/elasticsearch-py/elasticsearch-py-8.7.0.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-8.7.0.ebuild
new file mode 100644
index 000000000000..007cbecd25a8
--- /dev/null
+++ b/dev-python/elasticsearch-py/elasticsearch-py-8.7.0.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+inherit distutils-r1
+
+DESCRIPTION="Official Elasticsearch client library for Python"
+HOMEPAGE="
+ https://ela.st/es-python
+ https://github.com/elastic/elasticsearch-py
+ https://pypi.org/project/elasticsearch/
+"
+# Use bundled jdk for the test elasticsearch as there is no convenient way to ensure system jdk17 is used
+SRC_URI="
+ https://github.com/elastic/elasticsearch-py/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
+ test? (
+ amd64? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${PV}-linux-x86_64.tar.gz )
+ )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0/$(ver_cut 1)"
+KEYWORDS="~amd64 ~x86"
+
+RESTRICT="
+ !amd64? ( test )
+ !test? ( test )
+"
+
+RDEPEND="
+ >=dev-python/aiohttp-3[${PYTHON_USEDEP}] <dev-python/aiohttp-4[${PYTHON_USEDEP}]
+ >=dev-python/elastic-transport-8[${PYTHON_USEDEP}] <dev-python/elastic-transport-9[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.4[${PYTHON_USEDEP}] <dev-python/requests-3[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/mapbox-vector-tile[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-5.4[${PYTHON_USEDEP}]
+ dev-python/unasync[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_IGNORE=(
+ # REST api tests are a black hole for effort. It downloads the tests so its an ever moving target
+ # It also requires effort to blacklist tests for apis which are license restricted.
+ "test_elasticsearch/test_server/test_rest_api_spec.py"
+ # Counting deprecation warnings from python is bound to fail even if all are fixed in this package
+ # Not worth it
+ "test_elasticsearch/test_client/test_deprecated_options.py"
+)
+
+distutils_enable_sphinx docs/sphinx dev-python/sphinx-rtd-theme
+distutils_enable_tests pytest
+
+src_prepare() {
+ # Replace added pytest options with setting asyncio_mode to auto.
+ # Test suite hasnt set asyncio parameters so its needed here.
+ sed -i '/[tool:pytest]/,/^$/ { s/addopts.*/asyncio_mode = auto/ }' setup.cfg || die
+
+ default
+}
+
+src_test() {
+ local es_port="25124"
+
+ export ES_DIR="${WORKDIR}/elasticsearch-${PV}"
+ export ES_INSTANCE="gentoo-es-py-test"
+ export ELASTIC_PASSWORD="changeme"
+ export ELASTICSEARCH_URL="https://elastic:${ELASTIC_PASSWORD}@localhost:${es_port}"
+
+ # Default behavior sets these depending on available memory.
+ # On my system its not reliable and leads to an instant OOM :D
+ # So lets add a reasonable limit
+ export ES_JAVA_OPTS="-Xmx4g"
+
+ cat > "${ES_DIR}/config/elasticsearch.yml" <<-EOF || die
+ # Run elasticsearch on custom port
+ http.port: ${es_port}
+ cluster.routing.allocation.disk.threshold_enabled: false
+ bootstrap.memory_lock: true
+ node.attr.testattr: test
+ repositories.url.allowed_urls: http://snapshot.test*
+ action.destructive_requires_name: false
+ ingest.geoip.downloader.enabled: false
+
+ xpack.license.self_generated.type: basic
+ xpack.security.enabled: true
+ xpack.security.http.ssl.enabled: false
+ EOF
+
+ # Set password in keystore
+ printf "y\n${ELASTIC_PASSWORD}\n" | ${ES_DIR}/bin/elasticsearch-keystore add "bootstrap.password" || die
+
+ local es_instance="gentoo-py-test"
+ local es_log="${ES_DIR}/logs/${es_instance}.log"
+ local es_temp="${T}/es_temp"
+ local pid="${ES_DIR}/elasticsearch.pid"
+
+ mkdir ${es_temp} || die
+
+ ebegin "Starting Elasticsearch for ${EPYTHON}"
+
+ # start local instance of elasticsearch
+ "${ES_DIR}"/bin/elasticsearch -d -p "${pid}" \
+ -Ecluster.name="${es_instance}" -Epath.repo="${es_temp}" || die
+
+ local i es_started=0
+ for i in {1..20}; do
+ grep -q "started" ${es_log} 2> /dev/null
+ if [[ $? -eq 0 ]]; then
+ einfo "Elasticsearch started"
+ es_started=1
+ eend 0
+ break
+ elif grep -q 'BindException\[Address already in use\]' "${es_log}" 2>/dev/null; then
+ eend 1
+ eerror "Elasticsearch already running"
+ die "Cannot start Elasticsearch for tests"
+ else
+ einfo "Waiting for Elasticsearch"
+ sleep 2
+ continue
+ fi
+ done
+
+ [[ ${es_started} -eq 0 ]] && die "Elasticsearch failed to start"
+
+ distutils-r1_src_test
+
+ pkill -F ${pid} || die
+}
diff --git a/dev-python/elasticsearch-py/metadata.xml b/dev-python/elasticsearch-py/metadata.xml
index f5713ff4cfba..5e08a8961122 100644
--- a/dev-python/elasticsearch-py/metadata.xml
+++ b/dev-python/elasticsearch-py/metadata.xml
@@ -11,6 +11,6 @@
</maintainer>
<upstream>
<remote-id type="github">elastic/elasticsearch-py</remote-id>
- <remote-id type="pypi">elasticsearch7</remote-id>
+ <remote-id type="pypi">elasticsearch</remote-id>
</upstream>
</pkgmetadata>