summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/R/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index 11c5909efa..5e7c8492f6 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -136,6 +136,14 @@ class R(Package):
run_env.prepend_path('R_LIBS', os.path.join(
extension_spec.prefix, self.r_lib_dir))
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('LIBRARY_PATH',
+ join_path(self.prefix, 'rlib', 'R', 'lib'))
+ run_env.prepend_path('LD_LIBRARY_PATH',
+ join_path(self.prefix, 'rlib', 'R', 'lib'))
+ run_env.prepend_path('CPATH',
+ join_path(self.prefix, 'rlib', 'R', 'include'))
+
def setup_dependent_package(self, module, ext_spec):
"""Called before R modules' install() methods. In most cases,
extensions will only need to have one line: