git » aubio.git » commit 21f7f39

Adding check() using python{,2}-nose2.

author David Runge
2018-02-12 00:13:02 UTC
committer David Runge
2018-02-12 00:13:02 UTC
parent b7dccd11c63b22f6c47bd561dd5cecd5db6ac7ac

Adding check() using python{,2}-nose2.

PKGBUILD +12 -1

diff --git a/PKGBUILD b/PKGBUILD
index 856a5dc..6544ba2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
 pkgbase=aubio
 pkgname=('aubio' 'python-aubio' 'python2-aubio')
 pkgver=0.4.6
-pkgrel=1
+pkgrel=2
 pkgdesc="A tool for extracting annotations from audio signals"
 arch=('x86_64')
 url="https://aubio.org/"
@@ -13,6 +13,7 @@ license=('GPL3')
 makedepends=('doxygen' 'ffmpeg' 'fftw' 'jack' 'libsamplerate' 'libsndfile'
 'python-numpy' 'python-setuptools' 'python-sphinx' 'python2-numpy'
 'python2-setuptools' 'python2-sphinx' 'txt2man')
+checkdepends=('python-nose2' 'python2-nose2')
 source=("https://${pkgname}.org/pub/${pkgname}-${pkgver}.tar.bz2")
 sha512sums=('0e5cab0c88d51f2fb70c0d85e1c067a7b3758fbffdbd5026686726379aa36203adb63ed3f8e40c83ea02930e0ffc4e6c246803f1d518d448d47a01984678e77d')
 
@@ -38,6 +39,16 @@ build() {
   python2 setup.py build
 }
 
+check() {
+  cd "${pkgname[1]}-${pkgver}"
+  export PYTHONPATH="${srcdir}/${pkgname[1]}-${pkgver}/build/lib.linux-${arch}-3.6":${PYTHONPATH}
+  python setup.py test
+
+  cd ../"${pkgname[2]}-${pkgver}"
+  export PYTHONPATH="${srcdir}/${pkgname[2]}-${pkgver}/build/lib.linux-${arch}-2.7":${PYTHONPATH}
+  python2 setup.py test
+}
+
 package_aubio() {
   depends=('ffmpeg' 'fftw' 'jack' 'libsamplerate' 'libsndfile')
   optdepends=('python2-numpy: Python 2.x interface'