source: scripts/setenv_local.sh @ b3f79ca

feature/cnnfeature/crepefeature/pitchshiftfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretch
Last change on this file since b3f79ca was 0dfcea5, checked in by Paul Brossier <piem@piem.org>, 8 years ago

scripts/setenv_local.sh: update to new python-aubio build location

  • Property mode set to 100644
File size: 1009 bytes
Line 
1#! /usr/bin/env bash
2
3# This script sets the environment to execute aubio binaries and python code
4# directly from build/ python/build/ without installing libaubio on the system
5
6# Usage: $ source ./scripts/setenv_local.sh
7
8# WARNING: this script will *overwrite* existing (DY)LD_LIBRARY_PATH and
9# PYTHONPATH variables.
10
11PYTHON_PLATFORM=`python -c "import pkg_resources, sys; print '%s-%s' % (pkg_resources.get_build_platform(), '.'.join(map(str, sys.version_info[0:2])))"`
12
13AUBIODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
14AUBIOLIB=$AUBIODIR/build/src
15AUBIOPYTHON=$AUBIODIR/build/lib.$PYTHON_PLATFORM
16
17if [ "$(dirname $PWD)" == "scripts" ]; then
18  AUBIODIR=$(basename $PWD)
19else
20  AUBIODIR=$(basename $PWD)
21fi
22
23if [ "$(uname)" == "Darwin" ]; then
24  export DYLD_LIBRARY_PATH=$AUBIOLIB
25  echo export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
26else
27  export LD_LIBRARY_PATH=$AUBIOLIB
28  echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
29fi
30
31export PYTHONPATH=$AUBIOPYTHON
32echo export PYTHONPATH=$PYTHONPATH
Note: See TracBrowser for help on using the repository browser.