From b37e2b25b069bbae28d06e0d328145ae508c0fbf Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 10 May 2017 10:25:13 +0200 Subject: [PATCH] scripts/setenv_local.sh: clean up, only set LD_LIBRARY_PATH --- scripts/setenv_local.sh | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/scripts/setenv_local.sh b/scripts/setenv_local.sh index 6d33efaf..93fd9ded 100644 --- a/scripts/setenv_local.sh +++ b/scripts/setenv_local.sh @@ -1,24 +1,15 @@ #! /usr/bin/env bash -# This script sets the environment to execute aubio binaries and python code -# directly from build/ python/build/ without installing libaubio on the system - -# Usage: $ source ./scripts/setenv_local.sh - -# WARNING: this script will *overwrite* existing (DY)LD_LIBRARY_PATH and -# PYTHONPATH variables. - -PYTHON_PLATFORM=`python -c "import pkg_resources, sys; print ('%s-%s' % (pkg_resources.get_build_platform(), '.'.join(map(str, sys.version_info[0:2]))))"` +# This script sets the LD_LIBRARY_PATH environment variable to ./build/src to +# execute aubio binaries without installing libaubio. +# +# Usage: $ source scripts/setenv_local.sh +# +# Note: on macOs, the variable is DYLD_LIBRARY_PATH AUBIODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" -AUBIOLIB=$AUBIODIR/build/src -AUBIOPYTHON=$AUBIODIR/build/lib.$PYTHON_PLATFORM -if [ "$(dirname $PWD)" == "scripts" ]; then - AUBIODIR=$(basename $PWD) -else - AUBIODIR=$(basename $PWD) -fi +AUBIOLIB=$AUBIODIR/build/src if [ "$(uname)" == "Darwin" ]; then export DYLD_LIBRARY_PATH=$AUBIOLIB @@ -27,6 +18,3 @@ else export LD_LIBRARY_PATH=$AUBIOLIB echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH fi - -export PYTHONPATH=$AUBIOPYTHON -echo export PYTHONPATH=$PYTHONPATH -- 2.11.0