summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce8162513ae495b5c9844527ec35c96848ea057f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Manuel Wiesinger <m {you know what belongs here} mmap {and here} at>
# Maintainer: Xeonacid <h.dwwwwww@gmail.com>

_pyname=pyformlang
pkgname=python-$_pyname
pkgver=1.0.10
pkgrel=3
pkgdesc="Python library to manipulate formal grammar"
arch=('any')
url="https://github.com/Aunsiels/pyformlang"
license=('MIT')
depends=('python' 'python-networkx' 'python-numpy' 'python-pydot')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=(https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz)
b2sums=('1d45e1c700a46be39c95043c8a21fc6808d27d230cee83a35079acd39c13f12fd3290bab6d9f2244aab9ac856a906f0b523c992416d8bb94872e5c04134c2fdd')

check() {
    cd $srcdir/$_pyname-$pkgver
    PYTHONPATH=./build/lib/ pytest
}

build() {
    cd $srcdir/$_pyname-$pkgver
    python -m build --wheel --no-isolation
}

package() {
    cd $srcdir/$_pyname-$pkgver
    python -m installer --destdir="$pkgdir" dist/*.whl

    install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
    install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}