summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-20 15:37:31 -0500
committerGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-20 15:37:31 -0500
commitf9137f606f68392cca56bd19810c3c86addbae7a (patch)
treeb1cb9d65145923cb2024f0c00d4b1c76aeae7553
parent7555c3d9492b14d30866b7c5ec0ead79347ead05 (diff)
downloadspack-f9137f606f68392cca56bd19810c3c86addbae7a.tar.gz
spack-f9137f606f68392cca56bd19810c3c86addbae7a.tar.bz2
spack-f9137f606f68392cca56bd19810c3c86addbae7a.tar.xz
spack-f9137f606f68392cca56bd19810c3c86addbae7a.zip
Set environment variables
This commit adds `setup_environment` to export the libraries and headers. Fixes #1314.
-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: