diff options
author | Kino | 2024-05-19 03:36:44 +0800 |
---|---|---|
committer | Kino | 2024-05-19 03:36:44 +0800 |
commit | 5f0117c6a782f18498b50b465a9be80f8492a27b (patch) | |
tree | d9e9f0d0f4683738a7ca1d85c72b0072a0346ba4 | |
parent | ad780c53269f5027944e30b8a2d3db0ae69db04d (diff) | |
download | aur-5f0117c6a782f18498b50b465a9be80f8492a27b.tar.gz |
upgpkg: 0.16.3-2; enable tests
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 26 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = python-viztracer pkgdesc = VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution. pkgver = 0.16.3 - pkgrel = 1 + pkgrel = 2 url = https://github.com/gaogaotiantian/viztracer arch = x86_64 license = Apache-2.0 @@ -4,7 +4,7 @@ pkgname=python-viztracer _pkgname=viztracer pkgver=0.16.3 -pkgrel=1 +pkgrel=2 pkgdesc='VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.' arch=('x86_64') url="https://github.com/gaogaotiantian/viztracer" @@ -23,6 +23,19 @@ optdepends=( source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/gaogaotiantian/${_pkgname}/archive/${pkgver}.tar.gz") sha256sums=('959c8d52e55241deba86bebc33366ba8e23da93f5763b27a4a937632741ad225') +prepare() { + cd "$srcdir/$_pkgname-$pkgver" || exit + + # Avoid exceeding maximum recursion depth. + sed -i "s|call_self(1000)|call_self(888)|g" tests/test_vcompressor.py + + # Disable external processor testing because we don't have it. + sed -i "s|use_external_processor=True|use_external_processor=False|g" tests/test_viewer.py + + # Attach is not working, this is some black magic and is OS-dependent. + rm tests/test_remote.py +} + build() { cd "$srcdir/$_pkgname-$pkgver" || exit @@ -32,6 +45,17 @@ build() { python -m build --wheel --no-isolation } +check() { + cd "$srcdir/$_pkgname-$pkgver" || exit + + # From upstream, virtual environment is highly recommended. + python -m venv venv --system-site-packages + source venv/bin/activate + $PWD/venv/bin/python -m pip install loky + $PWD/venv/bin/python -m installer dist/*.whl + $PWD/venv/bin/python -m unittest +} + package() { cd "$srcdir/$_pkgname-$pkgver" || exit python -m installer --destdir="$pkgdir" dist/*.whl |