From 4065ef2106b04c671e1af6690dfb9ca1686f75e8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Fri, 6 Oct 2017 21:53:05 +0200 Subject: [PATCH] ncl: Fix temp directory and depend on esmf (#5636) * ncl: Fix temp directory Currently, ncl is configured using a transient temp directory. This leads to warnings such as this when executing ncl later on: warning:"/tmp/ncl_ncar_xxxxxx" tmp dir does not exist or is not writable: NCL functionality may be limited -- check TMPDIR environment variable As this also breaks some functionality, use the system temp directory instead (typically /tmp). * ncl: Depend on esmf esmf is required for some ncl scripts (such as ESMF_regridding.ncl). --- var/spack/repos/builtin/packages/ncl/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index a4ccf8bdc1..cbe83de04b 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -86,6 +86,9 @@ class Ncl(Package): depends_on('hdf5+szip') depends_on('szip') + # ESMF is only required at runtime (for ESMF_regridding.ncl) + depends_on('esmf', type='run') + # In Spack, we also do not have an option to compile netcdf without DAP # support, so we will tell the ncl configuration script that we have it. @@ -186,7 +189,7 @@ def prepare_install_config(self): # Parent installation directory : '\'' + self.spec.prefix + '\'\n', # System temp space directory : - '\'' + tempfile.mkdtemp(prefix='ncl_ncar_') + '\'\n', + '\'' + tempfile.gettempdir() + '\'\n', # Build NetCDF4 feature support (optional)? 'y\n' ]