summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2021-05-21 02:34:15 -0500
committerGitHub <noreply@github.com>2021-05-21 09:34:15 +0200
commit71b9e67b3c35d3f098a05a4ac9aac77b05fc6e06 (patch)
tree7774b14aa13a4f221afc2f58a717657245f5355d /var
parent3dfb61116d1b8c467c06ebc6d57ec74ed819d850 (diff)
downloadspack-71b9e67b3c35d3f098a05a4ac9aac77b05fc6e06.tar.gz
spack-71b9e67b3c35d3f098a05a4ac9aac77b05fc6e06.tar.bz2
spack-71b9e67b3c35d3f098a05a4ac9aac77b05fc6e06.tar.xz
spack-71b9e67b3c35d3f098a05a4ac9aac77b05fc6e06.zip
Modification to R environment (#23623)
* Modification to R environment This PR modifies how the R environmnet is presented, and fixes installing the standalone Rmath library. - The Rmath build and install methods are combined into one - Set parallel=False when installing Rmath - remove the run environment that set up variables for libraries and headers that are not really needed, and pollute the environment. * Add setup_run_environment back - Add back the setup_run_environment with LD_LIBRARY_PATH and PKG_CONFIG_PATH. - Adjust documentation to reflect the current code.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/r/package.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py
index c0859285b2..b0f1dc11e9 100644
--- a/var/spack/repos/builtin/packages/r/package.py
+++ b/var/spack/repos/builtin/packages/r/package.py
@@ -109,17 +109,12 @@ class R(AutotoolsPackage):
def etcdir(self):
return join_path(prefix, 'rlib', 'R', 'etc')
- @run_after('build')
- def build_rmath(self):
- if '+rmath' in self.spec:
- with working_dir('src/nmath/standalone'):
- make()
-
@run_after('install')
def install_rmath(self):
if '+rmath' in self.spec:
with working_dir('src/nmath/standalone'):
- make('install')
+ make()
+ make('install', parallel=False)
def configure_args(self):
spec = self.spec
@@ -225,12 +220,14 @@ class R(AutotoolsPackage):
dependent_spec.prefix, self.r_lib_dir))
def setup_run_environment(self, env):
- env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'rlib', 'R', 'lib'))
env.prepend_path('LD_LIBRARY_PATH',
join_path(self.prefix, 'rlib', 'R', 'lib'))
- env.prepend_path('CPATH',
- join_path(self.prefix, 'rlib', 'R', 'include'))
+ env.prepend_path('PKG_CONFIG_PATH',
+ join_path(self.prefix, 'rlib', 'pkgconfig'))
+
+ if '+rmath' in self.spec:
+ env.prepend_path('LD_LIBRARY_PATH',
+ join_path(self.prefix, 'rlib'))
def setup_dependent_package(self, module, dependent_spec):
"""Called before R modules' install() methods. In most cases,