aports/testing/py3-textual/APKBUILD
2024-12-07 20:17:21 +00:00

55 lines
1.5 KiB
Text

maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=py3-textual
_pyname=${pkgname#py3-}
pkgver=0.87.1
pkgrel=0
pkgdesc="TUI framework for Python inspired by modern web development"
url="https://github.com/Textualize/textual"
arch="noarch"
license="MIT"
depends="
python3
py3-linkify-it-py
py3-markdown-it-py
py3-mdit-py-plugins
py3-platformdirs
py3-rich
py3-typing-extensions
"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="
py3-pytest
py3-pytest-xdist
py3-pytest-asyncio
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Textualize/textual/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$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
# test_snapshots.py requires pytest-textual-snapshot, which depends on py3-textual itself, for snap_compare fixture
# test_languages.py requires optional tree_sitter_languages Python package
# test_features.py is broken
.testenv/bin/python3 -m pytest \
--ignore=tests/snapshot_tests/test_snapshots.py \
--ignore=tests/text_area/test_languages.py \
--ignore=tests/test_features.py
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
bd80c9e3afed7394e165bf67741e9b707d8b8e002b6bdc3778fee18eabc656a36675def87dac1e7acc2bf28917c193565d7ec8aa8cbf990e24b7e7a2a468af7b py3-textual-0.87.1.tar.gz
"