diff options
author | Jon Rood <jon.rood@nrel.gov> | 2017-10-26 03:12:04 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-10-26 11:12:04 +0200 |
commit | 18d2fe7647cdb97837ef08c8a5d86c0478ceee6d (patch) | |
tree | 9e5fbb647c44fa50ce22b90ec56feec5d57a4270 | |
parent | a05bbd71046629cbce9b18a7c00ed38ddeca37b8 (diff) | |
download | spack-18d2fe7647cdb97837ef08c8a5d86c0478ceee6d.tar.gz spack-18d2fe7647cdb97837ef08c8a5d86c0478ceee6d.tar.bz2 spack-18d2fe7647cdb97837ef08c8a5d86c0478ceee6d.tar.xz spack-18d2fe7647cdb97837ef08c8a5d86c0478ceee6d.zip |
Customization of the Paraview module file to its nonstandard directory structure (#5799)
* Add the custom paraview lib directory structure to the library paths in the paraview module file.
* Fixing flake8 issues.
* Checking if lib64 exists for paraview module file generation, else use lib.
* Fixing more flake8 problems I introduced.
-rw-r--r-- | var/spack/repos/builtin/packages/paraview/package.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 879924706a..e94f305b24 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os class Paraview(CMakePackage): @@ -89,6 +90,17 @@ class Paraview(CMakePackage): else: return self._urlfmt.format(version.up_to(2), version, '') + def setup_environment(self, spack_env, run_env): + if os.path.isdir(self.prefix.lib64): + lib_dir = self.prefix.lib64 + else: + lib_dir = self.prefix.lib + paraview_version = 'paraview-%s' % self.spec.version.up_to(2) + run_env.prepend_path('LIBRARY_PATH', join_path(lib_dir, + paraview_version)) + run_env.prepend_path('LD_LIBRARY_PATH', join_path(lib_dir, + paraview_version)) + def cmake_args(self): """Populate cmake arguments for ParaView.""" spec = self.spec |