diff options
author | Patrick Gartung <gartung@fnal.gov> | 2016-03-29 12:20:11 -0500 |
---|---|---|
committer | Patrick Gartung <gartung@fnal.gov> | 2016-03-29 12:20:11 -0500 |
commit | d96ea5ba0075c63e8cd042337a1d99225b92b2d5 (patch) | |
tree | 94fb0d67972d62f55fd355efcdddfa895442d48a | |
parent | e0fdb3410416f5a91aded450f1c92b01826210ea (diff) | |
download | spack-d96ea5ba0075c63e8cd042337a1d99225b92b2d5.tar.gz spack-d96ea5ba0075c63e8cd042337a1d99225b92b2d5.tar.bz2 spack-d96ea5ba0075c63e8cd042337a1d99225b92b2d5.tar.xz spack-d96ea5ba0075c63e8cd042337a1d99225b92b2d5.zip |
add modules package and have setup script find it if built
-rwxr-xr-x | share/spack/setup-env.sh | 10 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/modules/package.py | 25 |
2 files changed, 35 insertions, 0 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..529517ff83 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,3 +176,13 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" + +# +# Use spack built modules package if available +# for system that does not have it +# + +_modules_install_path=$(command spack location -i modules) +if [ -n "$_modules_install_path" ] ; then + . $_modules_install_path/Modules/init/sh +fi diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py new file mode 100644 index 0000000000..b014ee460c --- /dev/null +++ b/var/spack/repos/builtin/packages/modules/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Modules(Package): + """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """ + + homepage = "http://modules.sf.net" + url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" + + version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') + + depends_on("tcl") + + def install(self, spec, prefix): + + options = ['--prefix=%s' % prefix, + '--disable-debug', + '--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-versioning', + '--datarootdir=%s' % prefix.share, + 'CPPFLAGS=-DUSE_INTERP_ERRORLINE'] + + configure(*options) + make() + make("install") |