def on_init(app):  
docs_path = os.path.abspath(os.path.dirname(__file__))<EOL>root_path = os.path.abspath(os.path.join(docs_path, '<STR_LIT:..>'))<EOL>apidoc_path = '<STR_LIT>'<EOL>if hasattr(sys, '<STR_LIT>'):  <EOL><INDENT>bin_path = os.path.abspath(os.path.join(sys.prefix, '<STR_LIT>'))<EOL>apidoc_path = os.path.join(bin_path, apidoc_path)<EOL><DEDENT>check_call([apidoc_path, '<STR_LIT>', docs_path, os.path.join(root_path, '<STR_LIT>'),<EOL>os.path.join(root_path, '<STR_LIT>')])<EOL>
Run sphinx-apidoc after Sphinx initialization.

Read the Docs won't run tox or custom shell commands, so we need this to
avoid checking in the generated reStructuredText files.