SCons with Modules

SCons is a software construction tool (build tool, or make tool) implemented in Python, that uses Python scripts as "configuration files" for software builds.


cd /usr/local/src/SCONS
wget http://prdownloads.sourceforge.net/scons/scons-2.3.4.tar.gz
tar xvf scons-2.3.4.tar.gz
cd scons-2.3.4
python setup.py install --prefix=/usr/local/scons/2.3.4

Change to the appropriate modules directory, check for .desc and .version and .base, create a symblink to .base


cd /usr/local/Modules/modulefiles/scons
ln -s .base 2.3.4

The .base file looks like the following:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
prepend-path MANPATH /usr/local/$name/$ver/man
prepend-path PATH /usr/local/$name/$ver/bin