#NEWLINE# def maybe_build( self , maybe_modified_since_last_build ) : #NEWLINE# #INDENT# 'Builds an executable for the application if necessary.\n\n    Args:\n      maybe_modified_since_last_build: True if any files in the application root\n          or the GOPATH have changed since the last call to maybe_build, False\n          otherwise. This argument is used to decide whether a build is Required\n          or not.\n\n    Returns:\n      True if compilation was successfully performed (will raise\n        an exception if compilation was attempted but failed).\n      False if compilation was not attempted.\n\n    Raises:\n      BuildError: if building the executable fails for any reason.\n    ' #NEWLINE# if ( not self . _work_dir ) : #NEWLINE# #INDENT# self . _work_dir = tempfile . mkdtemp ( 'appengine-go-bin' ) #NEWLINE# atexit . register ( _rmtree , self . _work_dir ) #NEWLINE# #UNINDENT# if ( self . _go_executable and ( not maybe_modified_since_last_build ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if self . _go_executable : #NEWLINE# #INDENT# logging . debug ( 'Rebuilding Go application due to source modification' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logging . debug ( 'Building Go application' ) #NEWLINE# #UNINDENT# self . _build ( ) #NEWLINE# return True