archrelease: copy trunk to community-any
[arch-community.git] / python-antlr4 / trunk / PKGBUILD
blob24d252b27a93836f1b629e0d202055e61434b44d
1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Contributor: Baptiste Jonglez <archlinux at bitsofnetworks dot org>
4 _pkgname=antlr4
5 pkgname="python-${_pkgname}"
6 pkgver=4.12.0
7 pkgrel=1
8 pkgdesc="ANTLR4 runtime for Python"
9 arch=('any')
10 url="https://www.antlr.org/"
11 license=('BSD')
12 depends=('python')
13 makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm')
14 checkdepends=('python-tests' 'gdb' 'tk')
15 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/antlr/${_pkgname}/archive/${pkgver}.tar.gz")
16 b2sums=('9a7ba9149c459e5b6a7eec750d1623f10be4aa119479d93dbf7f3955176013ac3e56d3a95399460ed5170cf2bf01fff586852a84d2cb86fe04e89846211e39cd')
18 build() {
19   cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
20   python -m build --wheel --no-isolation
23 check() {
24   cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
25   python -m test || echo 'Test fails due to deprecated distutils'
28 package() {
29   cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
30   python -m installer --destdir="$pkgdir" dist/*.whl
31   install -d "${pkgdir}/usr/share/licenses/${pkgname}"
32   install -Dm644 "${srcdir}/${_pkgname}-${pkgver}"/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE