diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2019-07-05 13:18:04 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-07-06 07:00:13 +0700 |
commit | 1e386bdd4235cc246cc33aaa336671db9486f914 (patch) | |
tree | d584cab384c8e114ee48770a0a47fcf78d0c6b54 /libraries | |
parent | 74211c68dc121d1f736c8016cfcb6ec1a303ac73 (diff) |
libraries/aubio: Fix handling of the python{,3} bindings.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/aubio/README | 6 | ||||
-rw-r--r-- | libraries/aubio/aubio.SlackBuild | 16 |
2 files changed, 15 insertions, 7 deletions
diff --git a/libraries/aubio/README b/libraries/aubio/README index 1f7d7c30809b5..e9643bc662cdf 100644 --- a/libraries/aubio/README +++ b/libraries/aubio/README @@ -7,5 +7,7 @@ results too. jack-audio-connection-kit and ffmpeg are optional dependencies. -To build the python bindings, pass BINDINGS=yes to the script: -for these you need the additional dependency numpy. +The python bindings are built if numpy is available and the python3 +ones are built if numpy3 is available: if both versions of python +are present in the system, the aubio and aubiocut python scripts +will use python3. diff --git a/libraries/aubio/aubio.SlackBuild b/libraries/aubio/aubio.SlackBuild index b115f4c930958..254ed00744f7f 100644 --- a/libraries/aubio/aubio.SlackBuild +++ b/libraries/aubio/aubio.SlackBuild @@ -60,7 +60,7 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION-2 tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . @@ -93,10 +93,16 @@ CXXFLAGS="$SLKCFLAGS" \ ./waf install \ --destdir=$PKG -if ! [ "${BINDINGS:-no}" = "no" ]; then - cd python - python setup.py install --root=$PKG - cd .. +cd .. +cp -a $PRGNAM-$VERSION $PRGNAM-$VERSION-2 +cd - + +if $(python -c 'import numpy' 2>/dev/null); then + python setup.py install --root=$PKG +fi +if $(python3 -c 'import numpy' 2>/dev/null); then + ( cd ../$PRGNAM-$VERSION-2 + python3 setup.py install --root=$PKG ) fi find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ |