From a35cbd1af166d03583e034538eaca4e30e3c25f1 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Sun, 13 May 2012 17:50:15 -0400 Subject: [PATCH] Switch to use RPATH in test and example builds (#5). --- libs/numpy/example/SConscript | 2 ++ libs/numpy/test/SConscript | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/numpy/example/SConscript b/libs/numpy/example/SConscript index 3409bb1b..cd61b2bb 100644 --- a/libs/numpy/example/SConscript +++ b/libs/numpy/example/SConscript @@ -6,6 +6,8 @@ import os example_env = env.Clone() lib_path = os.path.abspath(os.path.join("..", "src")) example_env.Append(LIBPATH=[lib_path]) +example_env.Append(RPATH=[lib_path]) +example_env.Append(LINKFLAGS = ["$__RPATH"]) # workaround for SCons bug #1644 example_env.Append(LIBS=["boost_numpy"]) example = [] diff --git a/libs/numpy/test/SConscript b/libs/numpy/test/SConscript index 2b5b1186..150d01c5 100644 --- a/libs/numpy/test/SConscript +++ b/libs/numpy/test/SConscript @@ -6,9 +6,9 @@ import sys test_env = env.Clone() lib_path = os.path.abspath(os.path.join("..", "src")) -test_env.AppendENVPath("PYTHONPATH", os.path.abspath(".")) -test_env.AppendENVPath("LD_LIBRARY_PATH", lib_path) test_env.Append(LIBPATH=[lib_path]) +test_env.Append(RPATH=[lib_path]) +test_env.Append(LINKFLAGS = ["$__RPATH"]) # workaround for SCons bug #1644t test_env.Append(LIBS=["boost_numpy"]) test = []