summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorIgor Dejanovic2019-05-24 13:49:54 +0200
committerIgor Dejanovic2019-05-24 13:49:54 +0200
commit46066847814700beb318ec640da0e9bcdded0274 (patch)
tree97d6fb0f373400ab771a235b44e308875850509d /PKGBUILD
parent81cc429acd12940bfba32c1acfa185aa61e050e2 (diff)
downloadaur-46066847814700beb318ec640da0e9bcdded0274.tar.gz
Adding tests run and license
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 37 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6b165cf0e153..9cd556684c01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,52 @@
+# Maintainer: Igor R. Dejanović <igor dot dejanovic at gmail.com>
+
pkgname=python-textx
_srcname=textX
pkgver=2.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Python library for building Domain-Specific Languages and parsers"
arch=('any')
url="http://textx.github.io/textX/"
license=('MIT')
-depends=('python' 'python-arpeggio')
-source=(https://github.com/textX/$_srcname/archive/v$pkgver.tar.gz)
+depends=('python' 'python-arpeggio' 'python-click')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner' 'python-jinja')
+source=($pkgname-$pkgver.tar.gz::https://github.com/textX/$_srcname/archive/v$pkgver.tar.gz)
md5sums=('cc4fe6d5db278477b15afd5d349c1cda')
+build() {
+ cd $_srcname-$pkgver
+ python setup.py build
+}
+
+check() {
+
+ cd $_srcname-$pkgver
+
+ # Install all tests projects
+ pip install --user -e . || exit 1
+ pip install --user -e tests/functional/subcommands/example_project || exit 1
+ pip install --user -e tests/functional/registration/projects/types_dsl || exit 1
+ pip install --user -e tests/functional/registration/projects/data_dsl || exit 1
+ pip install --user -e tests/functional/registration/projects/flow_dsl || exit 1
+ pip install --user -e tests/functional/registration/projects/flow_codegen || exit 1
+
+ # Run all tests
+ python setup.py pytest --addopts tests/functional
+
+ # Uninstall all test projects
+ pip uninstall -y textX || exit 1
+ pip uninstall -y textX-subcommand-test || exit 1
+ pip uninstall -y types_dsl || exit 1
+ pip uninstall -y data_dsl || exit 1
+ pip uninstall -y flow_dsl || exit 1
+ pip uninstall -y flow_codegen || exit 1
+}
+
package() {
cd "$srcdir/$_srcname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
# vim:set ts=2 sw=2 et: