# Contributor: Bart Ribbers # Maintainer: pkgname=py3-gtts pkgver=2.5.1 pkgrel=1 pkgdesc="A Python library and CLI tool to interface with Google Translate text-to-speech API" url="https://github.com/pndurette/gTTS" arch="noarch" license="MIT" depends=" py3-click py3-requests " makedepends=" py3-gpep517 py3-setuptools py3-wheel " checkdepends=" py3-pytest py3-testfixtures " subpackages="$pkgname-pyc" source="https://github.com/pndurette/gTTS/archive/v$pkgver/gTTS-$pkgver.tar.gz" # Net required for tests options="net" builddir="$srcdir/gTTS-$pkgver" build() { gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m pytest } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl rm -r "$pkgdir"/usr/lib/python3*/site-packages/gtts/tests/ rm -r "$pkgdir"/usr/lib/python3*/site-packages/gtts/tokenizer/tests/ } sha512sums=" 2352c3f5a07db7d0b6145807d9e66d87fc328f14965e21b301d25a4c6e420d7dba25cbc1a70b4a21861291cf142142d6c3d3e453976febcc65f44ba708935751 gTTS-2.5.1.tar.gz "