source: scripts/setenv_local.sh @ 3388e1a

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since 3388e1a was c8e08c2, checked in by Paul Brossier <piem@piem.org>, 8 years ago

scripts/setenv_local.sh: python3 compat

  • Property mode set to 100644
File size: 1011 bytes
RevLine 
[d7f3c88]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
[c8e08c2]11PYTHON_PLATFORM=`python -c "import pkg_resources, sys; print ('%s-%s' % (pkg_resources.get_build_platform(), '.'.join(map(str, sys.version_info[0:2]))))"`
[d7f3c88]12
13AUBIODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
14AUBIOLIB=$AUBIODIR/build/src
[0dfcea5]15AUBIOPYTHON=$AUBIODIR/build/lib.$PYTHON_PLATFORM
[d7f3c88]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.