summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 75647e43b937b509ae2906c25ca53f1c29e1e92b (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
35
36
37
# Maintainer: Igor R. Dejanović <igor dot dejanovic at gmail.com>
# Contributor: Xiretza <xiretza at xiretza dot xyz>

pkgname=python-textx
_srcname=textX
pkgver=4.0.1
pkgrel=1
pkgdesc="Python library for building Domain-Specific Languages and parsers"
arch=('any')
url="https://textx.github.io/textX/"
license=('MIT')
depends=('python' 'python-setuptools' 'python-arpeggio')
optdepends=('python-click: textX CLI support')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-flit-core')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/textX/$_srcname/archive/$pkgver.tar.gz")
sha256sums=('4e87ea428c22363d6d966042d2f421b3bc8bc8ae9dc1c3d0c4844bf0212b9061')

build() {
  cd $_srcname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_srcname-$pkgver

  # textx fails to import from tests because it expects importlib metadata to be available
  #pytest --ignore tests/perf
}

package() {
  cd "$srcdir/$_srcname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et: