testing/py3-pymsteams: build with gpep517

This commit is contained in:
ptrcnull 2024-08-07 14:45:03 +02:00
parent 481b88914b
commit 770c88f771

View File

@ -2,12 +2,12 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-pymsteams
pkgver=0.2.3
pkgrel=0
pkgrel=1
pkgdesc="Format messages and post to Microsoft Teams."
url="https://github.com/rveachkc/pymsteams"
arch="noarch"
license="Apache-2.0"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-requests py3-py py3-pluggy"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rveachkc/pymsteams/archive/refs/tags/$pkgver.tar.gz"
@ -16,16 +16,21 @@ builddir="$srcdir"/${pkgname/py3-/}-$pkgver
options="!check"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
export MS_TEAMS_WEBHOOK="https://localhost"
python3 -m pytest -v -k "not test_message_size"
.testenv/bin/python3 -m pytest -v -k "not test_message_size"
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="