2023-10-21 12:00:45 +00:00
|
|
|
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
|
2021-06-25 01:52:23 +00:00
|
|
|
# Contributor: loqs
|
|
|
|
|
|
|
|
pkgname=stressberry
|
|
|
|
pkgver=0.3.3
|
2023-12-07 14:03:30 +00:00
|
|
|
pkgrel=8
|
2021-06-25 01:52:23 +00:00
|
|
|
pkgdesc='Stress tests and temperature plots for the Raspberry Pi'
|
|
|
|
arch=(any)
|
|
|
|
url='https://github.com/nschloe/stressberry'
|
|
|
|
license=(GPL3)
|
2023-12-07 14:03:30 +00:00
|
|
|
depends=(python-matplotlib python-yaml python-matplotx stress raspberrypi-utils)
|
2023-12-06 21:09:14 +00:00
|
|
|
makedepends=(python-pytest python-setuptools python-build python-installer python-wheel)
|
2023-12-07 14:03:30 +00:00
|
|
|
install=stressberry.install
|
2021-12-03 22:05:44 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/nschloe/$pkgname/archive/v$pkgver.tar.gz"
|
2022-03-22 21:37:03 +00:00
|
|
|
0001-convert-to-matplotx-from-dufte.patch::https://github.com/nschloe/stressberry/commit/55501513eaa2497c955daaa2179ca5c2e48eaa6b.patch)
|
2021-12-03 22:05:44 +00:00
|
|
|
b2sums=('3ebdcc0f0a951b9a0c8a5a35d96cda2edc535b58f08abeb3eefb281a7bb6c582e66e9eb601acce6c79ad92320c0b97ef481d2e76ffa97ae7e7033a5a7e9c38a3'
|
2021-12-04 17:47:39 +00:00
|
|
|
'6498fa0c57241ec9c228ecbbd25f4df6fe39b60fcbded91f90e85ee16c98cf64b0cb97e9a962bd1bea65d81d85c534eca6af5c456ee77883fcc793d83d13a876')
|
2021-12-03 22:05:44 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
patch -Np1 -i ../0001-convert-to-matplotx-from-dufte.patch
|
|
|
|
}
|
2021-06-25 01:52:23 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
|
|
}
|
|
|
|
|
2021-12-03 22:05:44 +00:00
|
|
|
check() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
mkdir -p temp
|
|
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
2023-12-06 21:09:14 +00:00
|
|
|
python -m installer --destdir=temp dist/*.whl
|
2021-12-03 22:05:44 +00:00
|
|
|
PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" python -m pytest
|
|
|
|
}
|
2021-06-25 01:52:23 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
export PYTHONHASHSEED=0
|
2023-12-06 21:09:14 +00:00
|
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
2021-06-25 01:52:23 +00:00
|
|
|
|
|
|
|
# Symlink license file
|
|
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
ln -s $site_packages/$pkgname-$pkgver.dist-info/LICENSE \
|
|
|
|
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
|
|
|
|
chmod +x "$pkgdir"/usr/bin/stressberry-plot
|
|
|
|
chmod +x "$pkgdir"/usr/bin/stressberry-run
|
|
|
|
}
|