| | |
| | | warnings.simplefilter('ignore', DeprecationWarning) |
| | | |
| | | import pkg_resources |
| | | import pylons_sphinx_themes |
| | | |
| | | # skip raw nodes |
| | | from sphinx.writers.text import TextTranslator |
| | |
| | | # Add any Sphinx extension module names here, as strings. They can be extensions |
| | | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| | | extensions = [ |
| | | 'repoze.sphinx.autointerface', |
| | | 'sphinx.ext.autodoc', |
| | | 'sphinx.ext.doctest', |
| | | 'repoze.sphinx.autointerface', |
| | | 'sphinx.ext.intersphinx', |
| | | 'sphinx.ext.todo', |
| | | 'sphinx.ext.viewcode', |
| | | 'sphinx.ext.intersphinx' |
| | | 'sphinxcontrib.autoprogram', |
| | | # enable pylons_sphinx_latesturl when this branch is no longer "latest" |
| | | # 'pylons_sphinx_latesturl', |
| | | ] |
| | | |
| | | # Looks for objects in external projects |
| | | intersphinx_mapping = { |
| | | 'tutorials': ('http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/', None), |
| | | 'jinja2': ('http://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/', None), |
| | | 'tm': ( |
| | | 'http://docs.pylonsproject.org/projects/pyramid_tm/en/latest/', |
| | | None, |
| | | ), |
| | | 'zcomponent': ('http://docs.zope.org/zope.component', None), |
| | | 'webtest': ('http://webtest.pythonpaste.org/en/latest', None), |
| | | 'webob': ('http://docs.webob.org/en/latest', None), |
| | | 'colander': ( |
| | | 'http://docs.pylonsproject.org/projects/colander/en/latest', |
| | | None), |
| | | 'deform': ( |
| | | 'http://docs.pylonsproject.org/projects/deform/en/latest', |
| | | None), |
| | | 'colander': ('https://docs.pylonsproject.org/projects/colander/en/latest', None), |
| | | 'cookbook': ('https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/', None), |
| | | 'cookiecutter': ('https://cookiecutter.readthedocs.io/en/latest/', None), |
| | | 'deform': ('https://docs.pylonsproject.org/projects/deform/en/latest', None), |
| | | 'jinja2': ('https://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None), |
| | | 'plaster': ('https://docs.pylonsproject.org/projects/plaster/en/latest/', None), |
| | | 'pylonswebframework': ('https://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None), |
| | | 'python': ('https://docs.python.org/3', None), |
| | | 'pytest': ('https://docs.pytest.org/en/latest/', None), |
| | | 'sphinx': ('http://www.sphinx-doc.org/en/latest', None), |
| | | 'sqla': ('http://docs.sqlalchemy.org/en/latest', None), |
| | | 'who': ('http://docs.repoze.org/who/latest', None), |
| | | 'python': ('http://docs.python.org', None), |
| | | 'python3': ('http://docs.python.org/3', None), |
| | | 'tstring': |
| | | ('http://docs.pylonsproject.org/projects/translationstring/en/latest', |
| | | None), |
| | | 'venusian': |
| | | ('http://docs.pylonsproject.org/projects/venusian/en/latest', None), |
| | | 'toolbar': |
| | | ('http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest', |
| | | None), |
| | | 'zcml': |
| | | ('http://docs.pylonsproject.org/projects/pyramid_zcml/en/latest', |
| | | None), |
| | | 'tm': ('https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None), |
| | | 'toolbar': ('https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest', None), |
| | | 'tstring': ('https://docs.pylonsproject.org/projects/translationstring/en/latest', None), |
| | | 'tutorials': ('https://docs.pylonsproject.org/projects/pyramid-tutorials/en/latest/', None), |
| | | 'venusian': ('https://docs.pylonsproject.org/projects/venusian/en/latest', None), |
| | | 'webob': ('http://docs.webob.org/en/latest', None), |
| | | 'webtest': ('http://webtest.pythonpaste.org/en/latest', None), |
| | | 'who': ('http://repozewho.readthedocs.io/en/latest', None), |
| | | 'zcml': ('https://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None), |
| | | 'zcomponent': ('http://zopecomponent.readthedocs.io/en/latest/', None), |
| | | 'zinterface': ('http://zopeinterface.readthedocs.io/en/latest/', None), |
| | | } |
| | | |
| | | |
| | |
| | | # Else, today_fmt is used as the format for a strftime call. |
| | | today_fmt = '%B %d, %Y' |
| | | |
| | | # List of documents that shouldn't be included in the build. |
| | | #unused_docs = [] |
| | | |
| | | # List of patterns, relative to source directory, that match files and |
| | | # directories to ignore when looking for source files. |
| | | exclude_patterns = ['_themes/README.rst', ] |
| | | |
| | | # List of directories, relative to source directories, that shouldn't be searched |
| | | # for source files. |
| | | #exclude_dirs = [] |
| | | |
| | | # The reST default role (used for this markup: `text`) to use for all documents. |
| | | #default_role = None |
| | | |
| | | # If true, '()' will be appended to :func: etc. cross-reference text. |
| | | #add_function_parentheses = True |
| | | |
| | | # If true, the current module name will be prepended to all description |
| | | # unit titles (such as .. function::). |
| | | add_module_names = False |
| | | |
| | | # If true, sectionauthor and moduleauthor directives will be shown in the |
| | | # output. They are ignored by default. |
| | | #show_authors = False |
| | | # Add support for todo items |
| | | todo_include_todos = True |
| | | |
| | | # The name of the Pygments (syntax highlighting) style to use. |
| | | #pygments_style = book and 'bw' or 'tango' |
| | | if book: |
| | | pygments_style = 'bw' |
| | | |
| | | # The default language to highlight source code in. |
| | | #highlight_language = 'guess' |
| | | |
| | | # Options for HTML output |
| | | # ----------------------- |
| | | # enable pylons_sphinx_latesturl when this branch is no longer "latest" |
| | | # pylons_sphinx_latesturl_base = ( |
| | | # 'https://docs.pylonsproject.org/projects/pyramid/en/latest/') |
| | | # pylons_sphinx_latesturl_pagename_overrides = { |
| | | # # map old pagename -> new pagename |
| | | # 'whatsnew-1.0': 'index', |
| | | # 'whatsnew-1.1': 'index', |
| | | # 'whatsnew-1.2': 'index', |
| | | # 'whatsnew-1.3': 'index', |
| | | # 'whatsnew-1.4': 'index', |
| | | # 'whatsnew-1.5': 'index', |
| | | # 'whatsnew-1.6': 'index', |
| | | # 'whatsnew-1.7': 'index', |
| | | # 'whatsnew-1.8': 'index', |
| | | # 'whatsnew-1.9': 'index', |
| | | # 'tutorials/gae/index': 'index', |
| | | # 'api/chameleon_text': 'api', |
| | | # 'api/chameleon_zpt': 'api', |
| | | # } |
| | | |
| | | # Add and use Pylons theme |
| | | if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers |
| | | from subprocess import call, Popen, PIPE |
| | | |
| | | p = Popen('which git', shell=True, stdout=PIPE) |
| | | cwd = os.getcwd() |
| | | _themes = os.path.join(cwd, '_themes') |
| | | git = p.stdout.read().strip() |
| | | if not os.listdir(_themes): |
| | | call([git, 'submodule', '--init']) |
| | | else: |
| | | call([git, 'submodule', 'update']) |
| | | |
| | | sys.path.append(os.path.abspath('_themes')) |
| | | |
| | | parent = os.path.dirname(os.path.dirname(__file__)) |
| | | sys.path.append(os.path.abspath(parent)) |
| | | wd = os.getcwd() |
| | | os.chdir(parent) |
| | | os.system('%s setup.py test -q' % sys.executable) |
| | | os.chdir(wd) |
| | | |
| | | for item in os.listdir(parent): |
| | | if item.endswith('.egg'): |
| | | sys.path.append(os.path.join(parent, item)) |
| | | |
| | | html_theme_path = ['_themes'] |
| | | html_theme = 'pyramid' |
| | | html_theme_path = pylons_sphinx_themes.get_html_themes_path() |
| | | html_theme_options = dict( |
| | | github_url='https://github.com/Pylons/pyramid', |
| | | in_progress='true', |
| | | # On master branch and new branch still in |
| | | # pre-release status: true; else: false. |
| | | in_progress='false', |
| | | # On branches previous to "latest": true; else: false. |
| | | outdated='false', |
| | | ) |
| | | # The style sheet to use for HTML and HTML Help pages. A file of that name |
| | | # must exist either in Sphinx' static/ path, or in one of the custom paths |
| | | # given in html_static_path. |
| | | #html_style = 'pyramid.css' |
| | | |
| | | # The name for this set of Sphinx documents. If None, it defaults to |
| | | # "<project> v<release> documentation". |
| | | html_title = 'The Pyramid Web Framework v%s' % release |
| | | |
| | | # A shorter title for the navigation bar. Default is the same as html_title. |
| | | #html_short_title = 'Home' |
| | | |
| | | # The name of an image file (within the static path) to place at the top of |
| | | # the sidebar. |
| | | #html_logo = '_static/pyramid.png' |
| | | |
| | | # The name of an image file (within the static path) to use as favicon of the |
| | | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| | | # pixels large. |
| | | #html_favicon = '_static/pyramid.ico' |
| | | |
| | | # Add any paths that contain custom static files (such as style sheets) here, |
| | | # relative to this directory. They are copied after the builtin static files, |
| | | # so a file named "default.css" will overwrite the builtin "default.css". |
| | | #html_static_path = ['_static'] |
| | | |
| | | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| | | # using the given strftime format. |
| | |
| | | # If true, SmartyPants will be used to convert quotes and dashes to |
| | | # typographically correct entities. |
| | | html_use_smartypants = False # people use cutnpaste in some places |
| | | |
| | | # Custom sidebar templates, maps document names to template names. |
| | | #html_sidebars = {} |
| | | |
| | | # Additional templates that should be rendered to pages, maps page names to |
| | | # template names. |
| | | #html_additional_pages = {} |
| | | |
| | | # If false, no module index is generated. |
| | | #html_use_modindex = True |
| | | |
| | | # If false, no index is generated. |
| | | #html_use_index = True |
| | | |
| | | # If true, the index is split into individual pages for each letter. |
| | | #html_split_index = False |
| | | |
| | | # If true, the reST sources are included in the HTML build as _sources/<name>. |
| | | #html_copy_source = True |
| | | |
| | | # If true, an OpenSearch description file will be output, and all pages will |
| | | # contain a <link> tag referring to it. The value of this option must be the |
| | | # base URL from which the finished HTML is served. |
| | | #html_use_opensearch = '' |
| | | |
| | | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
| | | #html_file_suffix = '' |
| | | |
| | | # Output file base name for HTML help builder. |
| | | htmlhelp_basename = 'pyramid' |
| | |
| | | 'Chris McDonough', 'manual'), |
| | | ] |
| | | |
| | | # The name of an image file (relative to this directory) to place at the top of |
| | | # the title page. |
| | | #latex_logo = '_static/pylons_small.png' |
| | | |
| | | # For "manual" documents, if this is true, then toplevel headings are parts, |
| | | # not chapters. |
| | | latex_use_parts = True |
| | | |
| | | # Additional stuff for the LaTeX preamble. |
| | | #latex_preamble = '' |
| | | |
| | | # Documents to append as an appendix to all manuals. |
| | | #latex_appendices = [] |
| | | latex_toplevel_sectioning = "section" |
| | | |
| | | # If false, no module index is generated. |
| | | latex_use_modindex = False |
| | | latex_domain_indices = False |
| | | |
| | | ## Say, for a moment that you have a twoside document that needs a 3cm |
| | | ## inner margin to allow for binding and at least two centimetres the |
| | |
| | | # A unique identification for the text. |
| | | epub_uid = 'The Pyramid Web Framework, Version %s' \ |
| | | % release |
| | | # HTML files that should be inserted before the pages created by sphinx. |
| | | # The format is a list of tuples containing the path and title. |
| | | #epub_pre_files = [] |
| | | |
| | | # HTML files shat should be inserted after the pages created by sphinx. |
| | | # The format is a list of tuples containing the path and title. |
| | | #epub_post_files = [] |
| | | |
| | | # A list of files that should not be packed into the epub file. |
| | | epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js', |
| | |
| | | |
| | | # The depth of the table of contents in toc.ncx. |
| | | epub_tocdepth = 3 |
| | | |
| | | # For a list of all settings, visit http://sphinx-doc.org/config.html |