From: Michael Orlitzky Date: Mon, 5 Apr 2010 19:24:28 +0000 (-0400) Subject: Add a wrapper which sets the LD_LIBRARY_PATH for lp_solve before executing a python... X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=commitdiff_plain;h=e3d9f4af0cbcbe3c73dac7e267d63a9392448fb8 Add a wrapper which sets the LD_LIBRARY_PATH for lp_solve before executing a python script. --- diff --git a/bin/lp_solve_wrapper b/bin/lp_solve_wrapper new file mode 100755 index 0000000..c7d2bd7 --- /dev/null +++ b/bin/lp_solve_wrapper @@ -0,0 +1,13 @@ +#!/bin/bash +# +# This wrapper is required to execute python scripts that utilize the +# lp_solve library. We can't set LD_LIBRARY_PATH from within the +# python script itself, so this wrapper simply sets it before +# executing the script. +# + +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../lib/lp_solve" + +# Run all but the first command-line argument. This should +# execute the python script, followed by all of its arguments. +python $*