# Contributions from Arch: # Maintainer: Jelle van der Waa # Contributor: Eli Schwartz pkgbase=python-dukpy pkgname=('python3-dukpy' 'python2-dukpy') pkgver=0.3 pkgrel=2 pkgdesc="Python bindings for the duktape embeddable JavaScript engine" arch=('x86_64') url="https://github.com/kovidgoyal/dukpy" license=('MIT') makedepends=('python3-setuptools' 'python2-setuptools' 'python3' 'python2') source=("dukpy-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha256sums=('cc78c39ebba51f381c623b164cfb7dcf3caddf515fe7094bc53b7eca5d4e435e') build() { cd "${srcdir}/dukpy-${pkgver}" python3 setup.py build python2 setup.py build } package_python3-dukpy() { depends=('python3') cd "dukpy-${pkgver}" python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-dukpy/LICENSE.txt" } package_python2-dukpy() { depends=('python2') cd "dukpy-${pkgver}" python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-dukpy/LICENSE.txt" } check() { cd "dukpy-${pkgver}" python3 setup.py test python2 setup.py test }