diff options
author | Dan Klein <danklei@cisco.com> | 2015-08-27 10:58:01 +0300 |
---|---|---|
committer | Dan Klein <danklei@cisco.com> | 2015-08-27 10:58:01 +0300 |
commit | c2154c0d362ced8f8b5181799c369e1497c958e1 (patch) | |
tree | 981b975d6f5c1ea860e462b66adab3f3bbc81360 /scripts/external_libs/dpkt-1.8.6.2/docs/conf.py | |
parent | f8ac9d14a989c8cf1535e16165551dfa370b0b74 (diff) |
reverting to dpkt v1.8.6 instead of 1.8.6.2 to avoid importing error of pystone modue
Diffstat (limited to 'scripts/external_libs/dpkt-1.8.6.2/docs/conf.py')
-rw-r--r-- | scripts/external_libs/dpkt-1.8.6.2/docs/conf.py | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/scripts/external_libs/dpkt-1.8.6.2/docs/conf.py b/scripts/external_libs/dpkt-1.8.6.2/docs/conf.py new file mode 100644 index 00000000..6dfc9fc4 --- /dev/null +++ b/scripts/external_libs/dpkt-1.8.6.2/docs/conf.py @@ -0,0 +1,76 @@ +# encoding: utf-8 + +"""dpkt documentation build configuration file""" + +from __future__ import unicode_literals + +import os +import re +import sys +import types +import mock + + +def get_version(filename): + init_py = open(filename).read() + metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py)) + return metadata['version'] + + +# -- Workarounds to have autodoc generate API docs ---------------------------- + +sys.path.insert(0, os.path.abspath('..')) + + +# Mock any objects that we might need to +foo = mock.Mock() +foo.__version__ = '0.1.1' +sys.modules['foo'] = foo + + +# -- General configuration ---------------------------------------------------- +needs_sphinx = '1.0' +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.extlinks', + 'sphinx.ext.intersphinx', + 'sphinx.ext.viewcode', + 'sphinx.ext.autosummary', + 'sphinxcontrib.napoleon' +] + +templates_path = ['_templates'] +source_suffix = '.rst' +master_doc = 'index' + +project = 'dpkt' +copyright = '2009-2015 Dug Song and contributors' + +release = get_version('../dpkt/__init__.py') +version = '.'.join(release.split('.')[:2]) + +exclude_patterns = ['_build'] + +pygments_style = 'sphinx' + +modindex_common_prefix = ['dpkt.'] + +autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance'] +autodoc_member_order = 'bysource' + + +# -- Options for HTML output -------------------------------------------------- +html_theme = 'default' +html_static_path = ['_static'] + +html_use_modindex = True +html_use_index = True +html_split_index = False +html_show_sourcelink = True + +htmlhelp_basename = 'dpkt' + +# -- Options for extlink extension -------------------------------------------- +extlinks = { + 'issue': ('https://github.com/kbandla/dpkt/issues/%s', '#'), +} |