<s> import sys <EOL> import os <EOL> BASE_DIR = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> ROOT = os . path . abspath ( os . path . join ( BASE_DIR , "<STR_LIT:..>" , "<STR_LIT:..>" ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , ROOT ) <EOL> sys . path . insert ( <NUM_LIT:0> , BASE_DIR ) <EOL> def gen_ref ( ver , title , names ) : <EOL> refdir = os . path . join ( BASE_DIR , "<STR_LIT>" ) <EOL> pkg = "<STR_LIT>" <EOL> if ver : <EOL> pkg = "<STR_LIT>" % ( pkg , ver ) <EOL> refdir = os . path . join ( refdir , ver ) <EOL> if not os . path . exists ( refdir ) : <EOL> os . makedirs ( refdir ) <EOL> idxpath = os . path . join ( refdir , "<STR_LIT>" ) <EOL> with open ( idxpath , "<STR_LIT:w>" ) as idx : <EOL> idx . write ( ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT:\n>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT:\n>" ) % { "<STR_LIT:title>" : title , "<STR_LIT>" : "<STR_LIT:=>" * len ( title ) } ) <EOL> for name in names : <EOL> idx . write ( "<STR_LIT>" % name ) <EOL> rstpath = os . path . join ( refdir , "<STR_LIT>" % name ) <EOL> with open ( rstpath , "<STR_LIT:w>" ) as rst : <EOL> rst . write ( ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT:\n>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> % { "<STR_LIT:title>" : name . capitalize ( ) , <EOL> "<STR_LIT>" : "<STR_LIT:=>" * len ( name ) , <EOL> "<STR_LIT>" : pkg , "<STR_LIT:name>" : name } ) <EOL> gen_ref ( None , "<STR_LIT>" , [ "<STR_LIT>" ] ) <EOL> gen_ref ( "<STR_LIT>" , "<STR_LIT>" , <EOL> [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> extensions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> autoclass_content = '<STR_LIT>' <EOL> templates_path = [ '<STR_LIT>' ] <EOL> source_suffix = '<STR_LIT>' <EOL> master_doc = '<STR_LIT:index>' <EOL> project = '<STR_LIT>' <EOL> copyright = '<STR_LIT>' <EOL> exclude_trees = [ ] <EOL> add_function_parentheses = True <EOL> add_module_names = True <EOL> pygments_style = '<STR_LIT>' <EOL> man_pages = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> [ '<STR_LIT>' ] , <NUM_LIT:1> ) , <EOL> ] <EOL> html_theme = '<STR_LIT:default>' <EOL> htmlhelp_basename = '<STR_LIT>' <EOL> latex_documents = [ <EOL> ( '<STR_LIT:index>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] </s>
