public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/elasticsearch-py/
Date: Tue,  9 Mar 2021 09:44:50 +0000 (UTC)	[thread overview]
Message-ID: <1615283071.7cef5a3f63834ef9f07c7a5ec1b7336bdc6620ac.sam@gentoo> (raw)

commit:     7cef5a3f63834ef9f07c7a5ec1b7336bdc6620ac
Author:     Peter Vielberth <code <AT> peter-vielberth <DOT> de>
AuthorDate: Sun Feb 21 23:55:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  9 09:44:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cef5a3f

dev-python/elasticsearch-py: added python 3.9 support

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Peter Vielberth <code <AT> peter-vielberth.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../elasticsearch-py-7.7.0-r1.ebuild               | 109 +++++++++++++++++++++
 1 file changed, 109 insertions(+)

diff --git a/dev-python/elasticsearch-py/elasticsearch-py-7.7.0-r1.ebuild b/dev-python/elasticsearch-py/elasticsearch-py-7.7.0-r1.ebuild
new file mode 100644
index 00000000000..ad8b35583da
--- /dev/null
+++ b/dev-python/elasticsearch-py/elasticsearch-py-7.7.0-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+DISTUTILS_USE_SETUPTOOLS=bdepend
+ES_VERSION="7.7.0"
+
+inherit distutils-r1
+
+MY_PN=${PN/-py/}
+DESCRIPTION="Official Python low-level client for Elasticsearch"
+HOMEPAGE="https://github.com/elastic/elasticsearch-py"
+SRC_URI="https://github.com/elastic/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+	test? ( https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-${ES_VERSION}-no-jdk-linux-x86_64.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+# tests fail in chroot
+# https://github.com/elastic/elasticsearch/issues/12018
+RESTRICT="test"
+
+RDEPEND="dev-python/certifi[${PYTHON_USEDEP}]
+	>=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+	dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+	test? (
+		>=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+		<dev-python/requests-3.0.0[${PYTHON_USEDEP}]
+		dev-python/nose[${PYTHON_USEDEP}]
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/pretty-yaml[${PYTHON_USEDEP}]
+		virtual/jre:*
+	)"
+BDEPEND=">=dev-python/sphinx-1.3.1-r1"
+
+python_prepare_all() {
+	# needs numpy/pandas
+	sed -e '/test_serializes_numpy_bool/,+79d' \
+		-e '/import numpy/d' \
+		-e '/import pandas/d' \
+		-i test_elasticsearch/test_serializer.py || die
+
+	sed -e '/coverage/d' \
+		-e '/nosexcover/d' \
+		-i setup.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+	emake -C docs -j1 man $(usex doc html "")
+}
+
+# FEATURES="test -usersandbox" emerge dev-python/elasticsearch-py
+python_test() {
+	local es="${WORKDIR}/elasticsearch-${ES_VERSION}"
+	local es_port="25124"
+	local es_instance="gentoo-es-py-test"
+	local es_log="${es}/logs/${es_instance}.log"
+	local pid="${es}/elasticsearch.pid"
+	export JAVA_HOME=$(java-config -g JAVA_HOME || die)
+
+	# run Elasticsearch instance on custom port
+	sed -i "s/#http.port: 9200/http.port: ${es_port}/g; \
+		s/#cluster.name: my-application/cluster.name: ${es_instance}/g" \
+		"${es}/config/elasticsearch.yml" || die
+
+	# start local instance of elasticsearch
+	"${es}"/bin/elasticsearch -d -p "${pid}" -Epath.repo=/ || die
+
+	local i
+	local 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"
+			eend 1
+			sleep 2
+			continue
+		fi
+	done
+
+	[[ $es_started -eq 0 ]] && die "Elasticsearch failed to start"
+
+	export ELASTICSEARCH_HOST="localhost:${es_port}"
+	nosetests -v || die
+
+	pkill -F ${pid} || die
+}
+
+python_install_all() {
+	use doc && HTML_DOCS=( docs/_build/html/. )
+	doman docs/_build/man/*
+	distutils-r1_python_install_all
+}


             reply	other threads:[~2021-03-09  9:44 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  9:44 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-24 18:48 [gentoo-commits] repo/gentoo:master commit in: dev-python/elasticsearch-py/ Michał Górny
2023-07-24 18:48 Michał Górny
2023-07-24 18:48 Michał Górny
2023-07-09  4:35 Sam James
2023-07-09  4:35 Sam James
2023-06-20 12:02 Jakov Smolić
2023-06-11  8:49 Joonas Niilola
2023-06-11  8:49 Joonas Niilola
2023-05-02 17:07 Joonas Niilola
2023-05-02 17:07 Joonas Niilola
2023-05-02 17:07 Joonas Niilola
2023-04-05 15:58 Michał Górny
2023-04-05 14:27 Arthur Zamarin
2023-04-05 14:27 Arthur Zamarin
2023-02-18  7:16 Sam James
2023-02-18  7:16 Sam James
2022-09-26  6:15 Michał Górny
2022-09-25 23:58 Sam James
2022-09-25 23:58 Sam James
2022-08-25 19:25 Arthur Zamarin
2021-11-05 19:16 Michał Górny
2021-11-05 17:33 Sam James
2021-11-05 14:57 Jakov Smolić
2021-10-10 23:45 Sam James
2021-10-05 13:37 Joonas Niilola
2021-10-05 13:37 Joonas Niilola
2021-10-02 12:46 Joonas Niilola
2021-04-11 11:23 Michał Górny
2021-04-11 11:11 Sam James
2021-04-11 11:06 Sam James
2021-02-21 13:20 David Seifert
2020-12-11 14:51 Michał Górny
2020-12-10 19:31 Thomas Deutschmann
2020-06-28 20:44 Agostino Sarubbo
2020-06-28 20:27 Agostino Sarubbo
2020-06-06  2:08 Aaron Bauman
2020-04-01 14:38 Joonas Niilola
2020-03-27  8:58 Michał Górny
2020-02-05 13:00 Michał Górny
2020-01-24  6:54 Joonas Niilola
2020-01-24  6:54 Joonas Niilola
2020-01-24  6:54 Joonas Niilola
2020-01-24  6:54 Joonas Niilola
2019-10-28 14:43 Joonas Niilola
2019-10-28 14:43 Joonas Niilola
2019-08-19 17:06 Joonas Niilola
2019-08-19 17:06 Joonas Niilola
2019-08-16 13:50 Michał Górny
2018-11-17 14:27 Mikle Kolyada
2018-11-15 15:48 Thomas Deutschmann
2018-09-28 10:45 Michał Górny
2018-09-28 10:45 Michał Górny
2018-09-13 15:34 Thomas Deutschmann
2018-09-13 15:34 Thomas Deutschmann
2018-07-11 10:32 Tony Vroon
2018-07-11 10:32 Tony Vroon
2018-05-11 21:56 Patrice Clement
2018-04-11 22:47 Patrice Clement
2018-02-14 21:55 Michał Górny
2018-02-14 21:55 Michał Górny
2018-02-14 21:55 Michał Górny
2018-01-03 19:02 Michał Górny
2017-11-30 14:47 Patrice Clement
2017-11-30 14:47 Patrice Clement
2017-11-30 14:47 Patrice Clement
2017-11-06 11:41 Manuel Rüger
2017-10-29 21:08 Thomas Deutschmann
2017-05-25 10:44 Agostino Sarubbo
2017-05-24 13:27 Michał Górny
2017-05-24 13:27 Michał Górny
2017-05-19 10:52 Michał Górny
2017-05-19  9:46 Manuel Rüger
2017-05-18 22:25 Michał Górny
2017-05-17 16:37 Patrick Lauer
2017-05-15 13:49 Manuel Rüger
2017-03-16 21:57 Göktürk Yüksek
2017-03-16 21:57 Göktürk Yüksek
2017-02-10 20:25 Göktürk Yüksek
2017-02-10 20:25 Göktürk Yüksek
2016-12-27 17:38 Göktürk Yüksek
2016-12-26 11:23 Aaron Bauman
2016-11-28 11:10 Patrick Lauer
2016-10-28 19:45 Patrick Lauer
2016-10-02 12:59 Göktürk Yüksek
2016-09-02  5:26 Patrick Lauer
2016-08-30 19:07 David Seifert
2016-08-23 19:00 David Seifert
2016-08-23 19:00 David Seifert
2016-08-23 19:00 David Seifert
2016-08-23 19:00 David Seifert
2016-04-18 16:16 Ian Delaney
2016-03-18 11:08 Patrick Lauer
2016-03-17 14:27 Patrick Lauer
2016-01-13 14:10 Patrice Clement
2015-11-23  7:53 Ian Delaney
2015-11-14 16:54 Markus Meier
2015-11-11 17:10 Ian Delaney
2015-11-10 16:08 Ian Delaney
2015-11-09  9:50 Ian Delaney
2015-10-26 19:36 Justin Lecher
2015-10-26 17:43 Richard Farina
2015-10-26 14:18 Ian Delaney
2015-10-26  3:47 Ian Delaney
2015-10-19 13:32 Ian Delaney
2015-08-20  4:45 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1615283071.7cef5a3f63834ef9f07c7a5ec1b7336bdc6620ac.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox