summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/aubio/README6
-rw-r--r--libraries/aubio/aubio.SlackBuild16
2 files changed, 15 insertions, 7 deletions
diff --git a/libraries/aubio/README b/libraries/aubio/README
index 1f7d7c3080..e9643bc662 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 b115f4c930..254ed00744 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 \