ref: b37e2b25b069bbae28d06e0d328145ae508c0fbf
parent: 21eb4c20c09cd389b2b3d6b7e7d81df41dde7839
author: Paul Brossier <piem@piem.org>
date: Wed May 10 06:25:13 EDT 2017
scripts/setenv_local.sh: clean up, only set LD_LIBRARY_PATH
--- a/scripts/setenv_local.sh
+++ b/scripts/setenv_local.sh
@@ -1,25 +1,16 @@
#! /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
+# 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
-# 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]))))"`
-
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
-
if [ "$(uname)" == "Darwin" ]; then
export DYLD_LIBRARY_PATH=$AUBIOLIB
echo export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
@@ -27,6 +18,3 @@
export LD_LIBRARY_PATH=$AUBIOLIB
echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
fi
-
-export PYTHONPATH=$AUBIOPYTHON
-echo export PYTHONPATH=$PYTHONPATH