source: scripts/setenv_local.sh @ 8470144

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 8470144 was d7f3c88, checked in by Paul Brossier <piem@piem.org>, 9 years ago

scripts/setenv_local.sh: set environment to run from built source tree

  • Property mode set to 100644
File size: 1016 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/python/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.