00001 """
00002 SLIMpy scons project tool
00003 """
00004
00005 from os.path import dirname as _dname,join as _join
00006 import SCons.Defaults as _scons_defaults
00007 import SCons.Tool
00008
00009 __copyright__ = """
00010 Copyright 2008 Sean Ross-Ross
00011 """
00012 __license__ = """
00013 This file is part of SLIMpy .
00014
00015 SLIMpy is free software: you can redistribute it and/or modify
00016 it under the terms of the GNU Lesser General Public License as published by
00017 the Free Software Foundation, either version 3 of the License, or
00018 (at your option) any later version.
00019
00020 SLIMpy is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00023 GNU Lesser General Public License for more details.
00024
00025 You should have received a copy of the GNU Lesser General Public License
00026 along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
00027 """
00028
00029
00030
00031 this_path = _dname(__file__)
00032 slim_toolpath = _join( this_path, 'slim_tools')
00033
00034
00035
00036
00037 def add_to_default_toolpath( toolpath ):
00038 SCons.Tool.DefaultToolpath.append( toolpath )
00039
00040
00041 def add_to_default_tools( atool ):
00042 if 'TOOLS' in _scons_defaults.ConstructionEnvironment:
00043 _scons_defaults.ConstructionEnvironment[ 'TOOLS' ].append( atool )
00044 else:
00045 _scons_defaults.ConstructionEnvironment[ 'TOOLS' ] = [ 'default', atool ]
00046
00047
00048 add_to_default_toolpath( slim_toolpath )
00049