...
Codeblock |
---|
#%Module######## ## # Load dependencies set reqs "hpc_basis" source /software/modules/common/common.tcl set softwareName "Test-Software" set softwareVersion "1.0" # installation base folder of software set softwareInstallFolder [resolvePath /software/$softwareName/$softwareVersion/REPLACE] set msg "Sets environment variables for $softwareName $softwareVersion" # Can be modified set bin_dir "$softwareInstallFolder/bin" set includes "$softwareInstallFolder/include" set libs "$softwareInstallFolder/lib" set uses_python "1" # Should not be changed proc ModulesHelp { } { global hpc_basis_version puts stderr "\t$msg" } module-whatis "$msg" if { ! [ file isdirectory $softwareInstallFolder ] } { puts stderr "\n!!!ERROR!!!\n" puts stderr "$softwareName not available for architecture ${::env(ARCH)}!" puts stderr "$softwareInstallFolder does not exist" exit } if {[string compare $bin_dir ""] != 0} { prepend-path PATH $bin_dir } if {[string compare $libs ""] != 0} { prepend-path LIBRARY_PATH $libs prepend-path LD_LIBRARY_PATH $libs } if {[string compare $includes ""] != 0} { prepend-path INCLUDE $includes prepend-path C_INCLUDE_PATH $includes prepend-path CPLUS_INCLUDE_PATH $includes prepend-path INCLUDE_PATH $includes prepend-path LD_INCLUDE_PATH $includes } if {[string compare $ uses$uses_python ""] != 0} { set p_version "python${::env(PYTHON_VERSION)}" set p_libdir [string range $p_version 0 8] prepend-path PYTHONPATH $root$softwareInstallFolder/lib/$libdir$p_libdir/site-packages } # Additional Paths # prepend-path PATH $softwareInstallFolder/scripts if { [ module-info mode load ] && ! [ catch {exec tty -s} ] } { puts stderr "\n $softwareName ($softwareVersion)" puts stderr " |--------------------------------------------------------------~o" if {[string compare $bin_dir ""] != 0} { puts stderr " binaries : $bin_dir" } if {[string compare $libs ""] != 0} { puts stderr " libs : $libs" } if {[string compare $includes ""] != 0} { puts stderr " includes : $includes" } } |
...