49 lines
1.5 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Justin Kromlinger <hashworks@archlinux.org>
# Contributor: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgname=python-anytree
pkgver=2.12.1
pkgrel=4
pkgdesc="Simple, lightweight and extensible Tree data structure."
arch=(any)
url="https://anytree.readthedocs.io/"
license=('Apache-2.0')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-poetry-core' 'python-wheel' 'git')
checkdepends=('python-pytest' 'graphviz')
source=(
"$pkgname::git+https://github.com/c0fec0de/anytree#tag=$pkgver"
0001-drop-six-dependency.patch
)
b2sums=('997f4611bf6e9b9bce01393d887743e395fb30a8a0fe5c8666847dd04edda8a2480c2d773b5508fa8539ad690d2cf2dd21852d6983d2939825f3d0ca9227c13e'
'e5a96c10757e052003060445a095aee6f6accc60d5240356dd7b3d06e9bd6eca8c5f7c5dcdbe555fba6ad104b4baa65053d66707d7617fbd9fa7ef609d8c35a8')
prepare() {
cd "$pkgname"
# Remove dependency on python-six
# https://github.com/c0fec0de/anytree/pull/250
git apply -3 ../0001-drop-six-dependency.patch
}
build() {
cd "$pkgname"
python -m build --wheel --no-isolation
}
check() {
cd "$pkgname"
mkdir -p tests/dotexport
python -m pytest
}
package() {
cd "$pkgname"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
}