# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgbase=python-xdot pkgname=('python2-xdot' 'python-xdot') _pkgname=xdot pkgver=1.6 _pyver=3.14 pkgrel=2 pkgdesc='Interactive viewer for Graphviz dot files.' arch=('any') url='https://pypi.org/project/xdot/#files' license=('LGPL') makedepends=('python2-setuptools' 'python-setuptools') conflicts=('xdot') provides=('xdot') source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz") sha512sums=('9aaca6e92b13413ca6e261daadac470bd21118a959a82a74fe69e2596797be91b74e31398b58c9b5848f6dafd0166ef80f36aab26f69a04054d1d8841d92977b') prepare() { cp -a "$_pkgname-$pkgver"{,-2} } build() { cd "$_pkgname-$pkgver-2" python2 setup.py build cd "$srcdir/$_pkgname-$pkgver" python setup.py build } package_python2-xdot() { depends=('python2' 'graphviz' 'pygtk') cd "$_pkgname-$pkgver-2" python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build find "$pkgdir/usr/lib/python2.7/site-packages/" -type f -exec chmod 644 {} \; mv "$pkgdir/usr/bin/$_pkgname" "$pkgdir/usr/bin/${_pkgname}2" } package_python-xdot() { depends=('python' 'graphviz' 'pygtk') cd "$_pkgname-$pkgver" python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build find "$pkgdir/usr/lib/python$_pyver/site-packages/" -type f \ -exec chmod 644 {} \; }