# Description: A modern parsing library
# URL: https://github.com/lark-parser/lark
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: python3-build

name=python3-lark-parser
version=1.3.1
release=1

# https://github.com/lark-parser/lark/tree/master/tests/test_nearley
_nearley_commit=326831689826cb1b9a4d21d1ce0d5db9278e9636

source=(https://github.com/lark-parser/lark/archive/$version/$name-$version.tar.gz
  https://github.com/kach/nearley/archive/$_nearley_commit/nearley-$_nearley_commit.tar.gz)

build() {
  rmdir lark-$version/tests/test_nearley/nearley
  ln -s nearely-$_nearley_commit lark-$version/tests/test_nearley/nearley

  cd lark-$version

  /usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
  /usr/bin/python3 -m installer --destdir=$PKG dist/*.whl
}
