diff options
Diffstat (limited to 'community/py3-gtts/APKBUILD')
-rw-r--r-- | community/py3-gtts/APKBUILD | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/community/py3-gtts/APKBUILD b/community/py3-gtts/APKBUILD index 62c1590b06f..429cc6fc6e0 100644 --- a/community/py3-gtts/APKBUILD +++ b/community/py3-gtts/APKBUILD @@ -1,42 +1,51 @@ # Contributor: Bart Ribbers <bribbers@disroot.org> -# Maintainer: Bart Ribbers <bribbers@disroot.org> +# Maintainer: pkgname=py3-gtts -pkgver=2.2.3 +pkgver=2.5.1 pkgrel=0 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-beautifulsoup4 py3-click - py3-gtts-token - python3 + py3-requests + " +makedepends=" + py3-gpep517 + py3-setuptools + py3-wheel " -makedepends="py3-setuptools" checkdepends=" - py3-mock py3-pytest py3-testfixtures " -source="https://pypi.python.org/packages/source/g/gTTS/gTTS-$pkgver.tar.gz" +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() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - # Tests fail currently https://github.com/pndurette/gTTS/issues/220 - pytest -k 'not test_file_ascii and not test_file_utf8' + python3 -m venv --clear --without-pip --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl + .testenv/bin/python3 -m pytest } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + 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=" -13f17c572bd9691cb15c8cb157f2f3b80e50dc11f596a268eccd59ba083dda3552b97238ed6206a08d1437316b7674ac16a0a8aa66e8a65c7dd62388ce716c77 gTTS-2.2.3.tar.gz +2352c3f5a07db7d0b6145807d9e66d87fc328f14965e21b301d25a4c6e420d7dba25cbc1a70b4a21861291cf142142d6c3d3e453976febcc65f44ba708935751 gTTS-2.5.1.tar.gz " |