#NEWLINE# @ classmethod #NEWLINE# def _check_gae_extension( cls , php_executable_path , gae_extension_path , env ) : #NEWLINE# #INDENT# 'Check if GAE extension can be loaded.' #NEWLINE# if ( not os . path . exists ( gae_extension_path ) ) : #NEWLINE# #INDENT# raise _PHPBinaryError ( ( 'The path specified with the --php_gae_extension_path flag (%s) does not exist.' % gae_extension_path ) ) #NEWLINE# #UNINDENT# env [ 'APPLICATION_ROOT' ] = os . getcwd ( ) #NEWLINE# args = [ php_executable_path , '-m' , '-d' , ( 'extension="%s"' % os . path . basename ( gae_extension_path ) ) , '-d' , ( 'extension_dir="%s"' % os . path . dirname ( gae_extension_path ) ) ] #NEWLINE# ext_process = safe_subprocess . start_process ( args , stdout = subprocess . PIPE , stderr = subprocess . PIPE , env = env ) #NEWLINE# ( ext_stdout , ext_stderr ) = ext_process . communicate ( ) #NEWLINE# if ext_stderr . returncode : #NEWLINE# #INDENT# raise _PHPEnvironmentError ( ( '"%s -m" returned an error [%d]\n%s%s' % ( php_executable_path , ext_process . returncode , ext_stderr , ext_stdout ) ) ) #NEWLINE# #UNINDENT# if ( GAE_EXTENSION_NAME not in ext_stdout ) : #NEWLINE# #INDENT# raise _PHPEnvironmentError ( ( 'Unable to load GAE runtime module at %s' % gae_extension_path ) )