pkgname="python-lark" _pkgname=lark pkgver=0.6.6 # typo upstream: https://github.com/lark-parser/lark/issues/329 _pkgver=0.66 pkgrel=1 pkgdesc="A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface" url="https://github.com/erezsh/lark" arch=("any") license=("MIT") depends=("python" "python-js2py") makedepends=("git" "python-setuptools") # Note: the latest tag has a typo in it source=( "$pkgname-$pkgver.tar.gz::https://github.com/lark-parser/$_pkgname/archive/$_pkgver.tar.gz" "git+https://github.com/Hardmath123/nearley#commit=a46b37471db486db0f6e1ce6a2934fb238346b44" ) sha256sums=('a97fa873326ec31743f18d07b81dabefba3a289b38cc9afeda7e9d0dd8b25b55' 'SKIP') prepare() { cd "$_pkgname-$_pkgver" rm -r tests/test_nearley/nearley/ ln -s ../../../nearley tests/test_nearley/ } build() { cd "$_pkgname-$_pkgver" python setup.py build } check() { cd "$_pkgname-$_pkgver" python -m test } package() { cd "$_pkgname-$_pkgver" python setup.py install --root="${pkgdir}/" --optimize=1 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE }