<s> """<STR_LIT>""" <EOL> import os , shutil , sys , tempfile , urllib2 <EOL> from optparse import OptionParser <EOL> tmpeggs = tempfile . mkdtemp ( ) <EOL> is_jython = sys . platform . startswith ( '<STR_LIT>' ) <EOL> parser = OptionParser ( ) <EOL> parser . add_option ( "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT:version>" , <EOL> help = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" , default = False , <EOL> help = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT:-c>" , None , action = "<STR_LIT:store>" , dest = "<STR_LIT>" , <EOL> help = ( "<STR_LIT>" <EOL> "<STR_LIT>" ) ) <EOL> options , args = parser . parse_args ( ) <EOL> if options . config_file is not None : <EOL> args += [ '<STR_LIT:-c>' , options . config_file ] <EOL> if options . version is not None : <EOL> VERSION = '<STR_LIT>' % options . version <EOL> else : <EOL> VERSION = '<STR_LIT>' <EOL> USE_DISTRIBUTE = options . distribute <EOL> args = args + [ '<STR_LIT>' ] <EOL> to_reload = False <EOL> try : <EOL> import pkg_resources <EOL> if not hasattr ( pkg_resources , '<STR_LIT>' ) : <EOL> to_reload = True <EOL> raise ImportError <EOL> except ImportError : <EOL> ez = { } <EOL> if USE_DISTRIBUTE : <EOL> exec urllib2 . urlopen ( '<STR_LIT>' <EOL> ) . read ( ) in ez <EOL> ez [ '<STR_LIT>' ] ( to_dir = tmpeggs , download_delay = <NUM_LIT:0> , no_fake = True ) <EOL> else : <EOL> exec urllib2 . urlopen ( '<STR_LIT>' <EOL> ) . read ( ) in ez <EOL> ez [ '<STR_LIT>' ] ( to_dir = tmpeggs , download_delay = <NUM_LIT:0> ) <EOL> if to_reload : <EOL> reload ( pkg_resources ) <EOL> else : <EOL> import pkg_resources <EOL> if sys . platform == '<STR_LIT:win32>' : <EOL> def quote ( c ) : <EOL> if '<STR_LIT:U+0020>' in c : <EOL> return '<STR_LIT>' % c <EOL> else : <EOL> return c <EOL> else : <EOL> def quote ( c ) : <EOL> return c <EOL> cmd = '<STR_LIT>' <EOL> ws = pkg_resources . working_set <EOL> if USE_DISTRIBUTE : <EOL> requirement = '<STR_LIT>' <EOL> else : <EOL> requirement = '<STR_LIT>' <EOL> if is_jython : <EOL> import subprocess <EOL> assert subprocess . Popen ( [ sys . executable ] + [ '<STR_LIT:-c>' , quote ( cmd ) , '<STR_LIT>' , <EOL> quote ( tmpeggs ) , '<STR_LIT>' + VERSION ] , <EOL> env = dict ( os . environ , <EOL> PYTHONPATH = <EOL> ws . find ( pkg_resources . Requirement . parse ( requirement ) ) . location <EOL> ) , <EOL> ) . wait ( ) == <NUM_LIT:0> <EOL> else : <EOL> assert os . spawnle ( <EOL> os . P_WAIT , sys . executable , quote ( sys . executable ) , <EOL> '<STR_LIT:-c>' , quote ( cmd ) , '<STR_LIT>' , quote ( tmpeggs ) , '<STR_LIT>' + VERSION , <EOL> dict ( os . environ , <EOL> PYTHONPATH = <EOL> ws . find ( pkg_resources . Requirement . parse ( requirement ) ) . location <EOL> ) , <EOL> ) == <NUM_LIT:0> <EOL> ws . add_entry ( tmpeggs ) <EOL> ws . require ( '<STR_LIT>' + VERSION ) <EOL> import zc . buildout . buildout <EOL> zc . buildout . buildout . main ( args ) <EOL> shutil . rmtree ( tmpeggs ) </s>
