57 lines
1.6 KiB
Bash
57 lines
1.6 KiB
Bash
# Copyright 1999-2015 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id$
|
|
|
|
EAPI=5
|
|
|
|
PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
|
|
|
|
inherit distutils-r1
|
|
|
|
DESCRIPTION="official Python low-level client for Elasticsearch"
|
|
HOMEPAGE="http://elasticsearch-py.rtfd.org/"
|
|
SRC_URI="https://github.com/elasticsearch/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="Apache-2.0"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm ~mips ~x86"
|
|
IUSE="examples doc test"
|
|
|
|
RDEPEND=">=dev-python/urllib3-1.8[${PYTHON_USEDEP}]
|
|
<dev-python/urllib3-2.0[${PYTHON_USEDEP}]"
|
|
|
|
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
|
doc? (
|
|
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] )
|
|
test? ( ${RDEPEND}
|
|
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
|
<dev-python/requests-3.0.0[${PYTHON_USEDEP}]
|
|
dev-python/nose[${PYTHON_USEDEP}]
|
|
dev-python/coverage[${PYTHON_USEDEP}]
|
|
dev-python/mock[${PYTHON_USEDEP}]
|
|
dev-python/pyyaml[${PYTHON_USEDEP}] )"
|
|
# nosexcover is listed for tests but is not essential
|
|
|
|
python_prepare_all() {
|
|
# Remove tests attempting to connect ot the network
|
|
rm -rf test_elasticsearch/test_server/ || die
|
|
distutils-r1_python_prepare_all
|
|
}
|
|
|
|
python_compile_all() {
|
|
use doc && emake -C docs html
|
|
}
|
|
|
|
python_test_all() {
|
|
# For unknown reason the testsuite fails to iterate the set of impls of PYTHON_COMPAT
|
|
# but they all pass on testing when run individually
|
|
"${PYTHON}" test_elasticsearch/run_tests.py
|
|
|
|
}
|
|
|
|
python_install_all() {
|
|
use doc && HTML_DOCS=( docs/_build/html/. )
|
|
use examples && local EXAMPLES=( example/. )
|
|
distutils-r1_python_install_all
|
|
}
|