<s> """<STR_LIT>""" <EOL> import os . path <EOL> import platform <EOL> from subprocess import call <EOL> from config import BASEDIR , ADDITIONAL_PACKAGES <EOL> current_platform = platform . system ( ) <EOL> virtualenv_path = os . path . join ( BASEDIR , '<STR_LIT>' ) <EOL> box_path = os . path . join ( BASEDIR , '<STR_LIT>' ) <EOL> ignite_path = os . path . join ( BASEDIR , '<STR_LIT>' ) <EOL> testrun_path = os . path . join ( BASEDIR , '<STR_LIT>' ) <EOL> green_path = os . path . join ( BASEDIR , '<STR_LIT>' ) <EOL> """<STR_LIT>""" <EOL> def update_environment ( file_path ) : <EOL> update_file = open ( file_path , '<STR_LIT:r>' ) <EOL> original_lines = update_file . readlines ( ) <EOL> original_lines [ <NUM_LIT:0> ] = '<STR_LIT>' <EOL> if current_platform == '<STR_LIT>' : <EOL> original_lines [ <NUM_LIT:0> ] = '<STR_LIT>' <EOL> update_file . close ( ) <EOL> update_file = open ( file_path , '<STR_LIT:w>' ) <EOL> for lines in original_lines : <EOL> update_file . write ( lines ) <EOL> update_file . close ( ) <EOL> """<STR_LIT>""" <EOL> def tempfix_migrate ( ) : <EOL> print "<STR_LIT>" <EOL> buggy_path = os . path . join ( BASEDIR , <EOL> '<STR_LIT>' ) <EOL> if current_platform == '<STR_LIT>' : <EOL> buggy_path = os . path . join ( BASEDIR , <EOL> '<STR_LIT>' ) <EOL> buggy_file = open ( buggy_path , '<STR_LIT:r>' ) <EOL> original_lines = buggy_file . readlines ( ) <EOL> original_lines [ <NUM_LIT:9> ] = "<STR_LIT>" <EOL> buggy_file . close ( ) <EOL> update_file = open ( buggy_path , '<STR_LIT:w>' ) <EOL> for lines in original_lines : <EOL> update_file . write ( lines ) <EOL> update_file . close ( ) <EOL> update_environment ( box_path ) <EOL> update_environment ( ignite_path ) <EOL> update_environment ( testrun_path ) <EOL> update_environment ( green_path ) <EOL> bin_base = '<STR_LIT>' <EOL> if current_platform == '<STR_LIT>' : <EOL> bin_base = '<STR_LIT>' <EOL> if not os . path . exists ( os . path . join ( BASEDIR , '<STR_LIT>' ) ) : <EOL> os . makedirs ( os . path . join ( BASEDIR , '<STR_LIT>' ) ) <EOL> call ( [ '<STR_LIT>' , virtualenv_path , '<STR_LIT>' ] ) <EOL> else : <EOL> if not os . path . exists ( os . path . join ( BASEDIR , '<STR_LIT>' ) ) : <EOL> os . makedirs ( os . path . join ( BASEDIR , '<STR_LIT>' ) ) <EOL> call ( [ '<STR_LIT>' , virtualenv_path , '<STR_LIT>' ] ) <EOL> call ( [ '<STR_LIT>' , '<STR_LIT>' , box_path ] ) <EOL> call ( [ '<STR_LIT>' , '<STR_LIT>' , ignite_path ] ) <EOL> call ( [ '<STR_LIT>' , '<STR_LIT>' , testrun_path ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> tempfix_migrate ( ) <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> call ( [ bin_base , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> if len ( ADDITIONAL_PACKAGES ) > <NUM_LIT:0> : <EOL> print '<STR_LIT>' <EOL> for package in ADDITIONAL_PACKAGES : <EOL> print '<STR_LIT>' + package . title ( ) + "<STR_LIT:\n>" <EOL> call ( [ bin_base , '<STR_LIT>' , package ] ) <EOL> print "<STR_LIT:\n>" + package . title ( ) + "<STR_LIT>" <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' </s>
