PKGBUILDs/aur/python-dufte/PKGBUILD

41 lines
1.4 KiB
Bash
Raw Normal View History

2021-06-25 01:51:35 +00:00
# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributor: loqs
_pkgname=dufte
pkgname=python-dufte
2021-07-20 00:48:50 +00:00
pkgver=0.2.24
pkgrel=1
2021-06-25 01:51:35 +00:00
pkgdesc='Creates clean and beautiful plots that work on light and dark backgrounds.'
arch=(any)
2021-07-18 15:01:26 +00:00
url='https://github.com/nschloe/dufte'
2021-06-25 01:51:35 +00:00
license=(GPL3)
2021-07-18 15:01:26 +00:00
depends=(python-matplotlib)
2021-06-25 01:51:35 +00:00
makedepends=(python-pytest python-setuptools python-build python-install python-wheel)
source=("$pkgname-$pkgver.tar.gz::https://github.com/nschloe/$_pkgname/archive/v$pkgver.tar.gz")
2021-07-20 00:48:50 +00:00
b2sums=('869aef15c0921b98c7ada0f8fc4d5a8f13892c7c9cfca9bc3e564f3c93423f413892bb88c7afe019e9bafe1ba33d9fcf885991d49b90909c292cf376b972c7ea')
2021-06-25 01:51:35 +00:00
build() {
cd $_pkgname-$pkgver
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd $_pkgname-$pkgver
mkdir -p temp
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m install --optimize=1 --destdir=temp dist/*.whl
PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" python -m pytest
}
package() {
cd $_pkgname-$pkgver
export PYTHONHASHSEED=0
python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
# 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
}