# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py3-elasticsearch
_pkgname=elasticsearch-py
pkgver=7.11.0
pkgrel=4
pkgdesc="Official Python low-level client for Elasticsearch"
options="!check" # Tests fail on the builders
url="https://elasticsearch-py.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-urllib3"
checkdepends="py3-requests py3-nose py3-coverage py3-mock py3-yaml py3-nosexcover"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/elastic/elasticsearch-py/archive/v$pkgver.tar.gz"
builddir="$srcdir/"$_pkgname-$pkgver

replaces="py-elasticsearch" # Backwards compatibility
provides="py-elasticsearch=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
39763a6cc884b03787e0afe92e70a358ece936f18fb123c2a7ae42b60408f6f2b2e99932c0162721d3ea5c95a021f3c2346dc67b7c39115773155fef9fbd67d4  py3-elasticsearch-7.11.0.tar.gz
"
