<s> import sys <EOL> def run_command ( ) : pass <EOL> def do_vcs_install ( manifest_in , versionfile_source , ipy ) : <EOL> """<STR_LIT>""" <EOL> GITS = [ "<STR_LIT>" ] <EOL> if sys . platform == "<STR_LIT:win32>" : <EOL> GITS = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> files = [ manifest_in , versionfile_source ] <EOL> if ipy : <EOL> files . append ( ipy ) <EOL> try : <EOL> me = __file__ <EOL> if me . endswith ( "<STR_LIT>" ) or me . endswith ( "<STR_LIT>" ) : <EOL> me = os . path . splitext ( me ) [ <NUM_LIT:0> ] + "<STR_LIT>" <EOL> versioneer_file = os . path . relpath ( me ) <EOL> except NameError : <EOL> versioneer_file = "<STR_LIT>" <EOL> files . append ( versioneer_file ) <EOL> present = False <EOL> try : <EOL> f = open ( "<STR_LIT>" , "<STR_LIT:r>" ) <EOL> for line in f . readlines ( ) : <EOL> if line . strip ( ) . startswith ( versionfile_source ) : <EOL> if "<STR_LIT>" in line . strip ( ) . split ( ) [ <NUM_LIT:1> : ] : <EOL> present = True <EOL> f . close ( ) <EOL> except EnvironmentError : <EOL> pass <EOL> if not present : <EOL> f = open ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> f . write ( "<STR_LIT>" % versionfile_source ) <EOL> f . close ( ) <EOL> files . append ( "<STR_LIT>" ) <EOL> run_command ( GITS , [ "<STR_LIT>" , "<STR_LIT>" ] + files ) </s>
