<s> import os <EOL> import shutil <EOL> import stat <EOL> import subprocess <EOL> import sys <EOL> import inventory <EOL> VERBOSE = False <EOL> def run_setup ( path ) : <EOL> curdir = os . getcwd ( ) <EOL> print ( '<STR_LIT>' % path ) <EOL> os . chdir ( path ) <EOL> if os . path . isdir ( '<STR_LIT>' ) : <EOL> shutil . rmtree ( '<STR_LIT>' ) <EOL> stdout = subprocess . check_output ( '<STR_LIT>' % sys . executable , <EOL> stderr = subprocess . STDOUT , shell = True ) <EOL> if VERBOSE : <EOL> print ( stdout ) <EOL> os . chdir ( curdir ) <EOL> if os . path . dirname ( __file__ ) . endswith ( '<STR_LIT>' ) : <EOL> os . chdir ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT:..>' ) ) <EOL> modulePaths = inventory . getModulePaths ( ) <EOL> for modulePath in modulePaths : <EOL> run_setup ( modulePath ) <EOL> cp_dest = os . path . sep + '<STR_LIT>' <EOL> cp_dest = os . path . join ( cp_dest , '<STR_LIT>' ) <EOL> cp_dest = os . path . join ( cp_dest , '<STR_LIT>' ) <EOL> cp_dest = os . path . join ( cp_dest , '<STR_LIT>' ) <EOL> if not os . path . exists ( cp_dest ) : <EOL> os . makedirs ( cp_dest ) <EOL> cp_dest = os . path . join ( cp_dest , '<STR_LIT>' ) <EOL> if os . path . exists ( cp_dest ) : <EOL> os . remove ( cp_dest ) <EOL> shutil . copyfile ( '<STR_LIT>' , cp_dest ) <EOL> os . chmod ( cp_dest , <EOL> stat . S_IRUSR | stat . S_IWUSR | stat . S_IXUSR | <EOL> stat . S_IRGRP | stat . S_IXGRP | <EOL> stat . S_IROTH | stat . S_IXOTH ) </s>
