00001 """
00002
00003 This is the Runner Class. It should inherit from the PresidenceStack to allow for operators.
00004 Unless this is not in the given task.
00005
00006 """
00007
00008 __copyright__ = """
00009 Copyright 2008 Sean Ross-Ross
00010 """
00011 __license__ = """
00012 This file is part of SLIMpy .
00013
00014 SLIMpy is free software: you can redistribute it and/or modify
00015 it under the terms of the GNU Lesser General Public License as published by
00016 the Free Software Foundation, either version 3 of the License, or
00017 (at your option) any later version.
00018
00019 SLIMpy is distributed in the hope that it will be useful,
00020 but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00022 GNU Lesser General Public License for more details.
00023
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
00026 """
00027
00028
00029 from slimpy_base.Core.Runners.RunnerBase import Runner
00030 from slimpy_base.Core.Graph.Builders.SConsBuilder import SConsBuilder
00031
00032 class sconsRunner( Runner ):
00033 """
00034 print a SConstruct compatible script to stdout
00035 """
00036 type = "scons"
00037
00038 def __init__( self ):
00039 Runner.__init__( self )
00040 def set_graph(self,graph):
00041
00042 self.graph = graph
00043
00044
00045 def run( self ):
00046 """
00047 run the current graph with targets
00048 """
00049
00050 scons = SConsBuilder( self.graph, None )
00051 print scons.printSCons()
00052