# Maintainer: Yauhen Kirylau # Maintainer: Padraic Fanning _name=gaphor pkgname=python-${_name} pkgver=2.9.2 pkgrel=5 pkgdesc="Simple and easy to use modeling tool for UML using GTK3" arch=('any') url="https://github.com/gaphor/${_name}" license=('Apache') depends=( 'gtk3' 'gtksourceview4' 'python-darkdetect' 'python-gaphas' 'python-generic' 'python-jedi' 'python-tinycss2' 'python-typing_extensions' ) makedepends=( 'gendesk' 'python-build' 'python-installer' 'python-poetry-core' ) checkdepends=( 'python-hypothesis' 'python-pytest' 'python-pytest-mock' 'python-sphinx' 'python-xdoctest' ) source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") sha256sums=('687f0f9a75e72daa9535bbbc6b8592e0ee37ae9451b9085bd2d972a1fb07b51f') build() { cd "${_name}-${pkgver}" # Note: set `GIT_CEILING_DIRECTORIES` to prevent poetry # from incorrectly using a parent git checkout info. # https://github.com/pypa/build/issues/384#issuecomment-947675975 GIT_CEILING_DIRECTORIES="${PWD}/.." python -m build --wheel --no-isolation } check() { cd "${srcdir}/${_name}-${pkgver}" pytest \ --ignore=gaphor/plugins/console/tests/test_console.py \ --ignore=gaphor/ui/tests/test_greeter.py \ --ignore=gaphor/ui/tests/test_handletool.py \ --ignore=gaphor/ui/tests/test_main.py \ --ignore=tests/test_diagram_tools.py } prepare() { gendesk -f -n --pkgname="$_name" --pkgdesc="$pkgdesc" --icon='org.gaphor.Gaphor' --categories='Development' PKGBUILD } package() { cd "${_name}-${pkgver}" python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 "$srcdir/${_name}.desktop" -t "$pkgdir"/usr/share/applications install -Dm644 "$srcdir/${_name}-${pkgver}/logos/org.gaphor.Gaphor.svg" "$pkgdir"/usr/share/pixmaps/org.gaphor.Gaphor.svg }