testing/py3-telegram-bot: build with gpep517

This commit is contained in:
ptrcnull 2024-08-05 22:46:02 +02:00
parent 2ff19bbc02
commit 405894ceae

View File

@ -3,7 +3,7 @@
pkgname=py3-telegram-bot
_pkgname=python-telegram-bot
pkgver=20.8
pkgrel=1
pkgrel=2
pkgdesc="A Python wrapper around the Telegram Bot API"
url="https://github.com/python-telegram-bot/python-telegram-bot"
arch="noarch"
@ -11,7 +11,7 @@ license="LGPL-3.0-or-later"
depends="py3-future py3-certifi py3-tornado py3-cryptography py3-decorator"
#checkdepends="pytest py-cffi py-cryptography py-future py-pathlib2"
options="!check" # few requirements-dev.txt packages missing in alpine
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-telegram-bot/python-telegram-bot/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
@ -20,15 +20,20 @@ replaces="py-telegram-bot" # Backwards compatibility
provides="py-telegram-bot=$pkgver-r$pkgrel" # Backwards compatibility
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 setup.py test
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m unittest discover
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="