<s> import os <EOL> import sys <EOL> from datetime import datetime <EOL> from trac . util import get_pkginfo <EOL> pkg_info = get_pkginfo ( sys . modules [ '<STR_LIT>' ] ) <EOL> project = '<STR_LIT>' <EOL> copyright = '<STR_LIT>' % datetime . now ( ) . year <EOL> url = pkg_info [ '<STR_LIT>' ] <EOL> version = pkg_info [ '<STR_LIT:version>' ] . split ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> release = pkg_info [ '<STR_LIT:version>' ] <EOL> devel = '<STR_LIT>' in pkg_info [ '<STR_LIT:version>' ] <EOL> extensions = [ ] <EOL> extensions . append ( '<STR_LIT>' ) <EOL> autoclass_content = '<STR_LIT>' <EOL> autodoc_member_order = '<STR_LIT>' <EOL> extensions . append ( '<STR_LIT>' ) <EOL> extensions . append ( '<STR_LIT>' ) <EOL> intersphinx_mapping = { '<STR_LIT>' : ( '<STR_LIT>' , None ) } <EOL> extensions . append ( '<STR_LIT>' ) <EOL> todo_include_todos = devel <EOL> try : <EOL> import rst2pdf <EOL> extensions . append ( '<STR_LIT>' ) <EOL> except ImportError : <EOL> pass <EOL> source_suffix = '<STR_LIT>' <EOL> master_doc = '<STR_LIT:index>' <EOL> today_fmt = '<STR_LIT>' <EOL> unused_docs = [ ] <EOL> exclude_patterns = [ <EOL> ] <EOL> pygments_style = '<STR_LIT>' <EOL> default_role = '<STR_LIT>' <EOL> html_style = '<STR_LIT>' <EOL> html_theme = '<STR_LIT>' <EOL> html_theme_options = { <EOL> } <EOL> html_logo = '<STR_LIT>' <EOL> html_static_path = [ '<STR_LIT>' ] <EOL> html_last_updated_fmt = '<STR_LIT>' <EOL> html_use_modindex = True <EOL> htmlhelp_basename = '<STR_LIT>' <EOL> modindex_common_prefix = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> latex_documents = [ <EOL> ( '<STR_LIT:index>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] <EOL> pdf_documents = [ <EOL> ( '<STR_LIT:index>' , '<STR_LIT>' , project , u'<STR_LIT>' ) , <EOL> ] <EOL> pdf_stylesheets = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> ] <EOL> pdf_compressed = True <EOL> pdf_language = "<STR_LIT>" <EOL> pdf_fit_mode = "<STR_LIT>" <EOL> pdf_break_level = <NUM_LIT:1> <EOL> pdf_use_index = True <EOL> pdf_use_modindex = True <EOL> pdf_toc_depth = <NUM_LIT> <EOL> pdf_use_numbered_links = False <EOL> pdf_fit_background_mode = '<STR_LIT>' <EOL> def setup ( app ) : <EOL> from docutils import nodes <EOL> from docutils . parsers . rst import roles <EOL> def teo_role ( name , rawtext , text , lineno , inliner , options = { } , content = [ ] ) : <EOL> if text [ <NUM_LIT:0> ] == '<STR_LIT:#>' : <EOL> ref = url + '<STR_LIT>' + text [ <NUM_LIT:1> : ] <EOL> else : <EOL> ref = url + '<STR_LIT>' + text <EOL> roles . set_classes ( options ) <EOL> node = nodes . reference ( rawtext , text , refuri = ref , ** options ) <EOL> return [ node ] , [ ] <EOL> roles . register_canonical_role ( '<STR_LIT>' , teo_role ) <EOL> def extensionpoints_role ( name , rawtext , text , lineno , inliner , options = { } , <EOL> content = [ ] ) : <EOL> ref = url + '<STR_LIT>' + text <EOL> roles . set_classes ( options ) <EOL> node = nodes . reference ( rawtext , text + "<STR_LIT>" , <EOL> refuri = ref , ** options ) <EOL> return [ node ] , [ ] <EOL> roles . register_canonical_role ( '<STR_LIT>' , extensionpoints_role ) <EOL> app . add_config_value ( '<STR_LIT>' , '<STR_LIT>' , True ) </s>
