conf.py 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # -*- coding: utf-8 -*-
  2. import sys
  3. import os
  4. this = os.path.dirname(os.path.abspath(__file__))
  5. # If your extensions are in another directory, add it here. If the directory
  6. # is relative to the documentation root, use os.path.abspath to make it
  7. # absolute, like shown here.
  8. sys.path.insert(0, os.path.join(this, os.pardir))
  9. sys.path.append(os.path.join(this, '_ext'))
  10. import celery # noqa
  11. # General configuration
  12. # ---------------------
  13. extensions = ['sphinx.ext.autodoc',
  14. 'sphinx.ext.coverage',
  15. 'sphinx.ext.pngmath',
  16. 'sphinx.ext.viewcode',
  17. 'sphinx.ext.coverage',
  18. 'sphinx.ext.intersphinx',
  19. 'sphinxcontrib.cheeseshop',
  20. 'celery.contrib.sphinx',
  21. 'githubsphinx',
  22. 'celerydocs']
  23. LINKCODE_URL = 'https://github.com/{proj}/tree/{branch}/{filename}.py'
  24. GITHUB_PROJECT = 'celery/celery'
  25. GITHUB_BRANCH = 'master'
  26. def linkcode_resolve(domain, info):
  27. if domain != 'py' or not info['module']:
  28. return
  29. filename = info['module'].replace('.', '/')
  30. return LINKCODE_URL.format(
  31. proj=GITHUB_PROJECT,
  32. branch=GITHUB_BRANCH,
  33. filename=filename,
  34. )
  35. html_show_sphinx = False
  36. # Add any paths that contain templates here, relative to this directory.
  37. templates_path = ['.templates']
  38. # The suffix of source filenames.
  39. source_suffix = '.rst'
  40. # The master toctree document.
  41. master_doc = 'index'
  42. # General information about the project.
  43. project = 'Celery'
  44. copyright = '2009-2016, Ask Solem & Contributors'
  45. # The version info for the project you're documenting, acts as replacement for
  46. # |version| and |release|, also used in various other places throughout the
  47. # built documents.
  48. #
  49. # The short X.Y version.
  50. version = '.'.join(map(str, celery.VERSION[0:2]))
  51. # The full version, including alpha/beta/rc tags.
  52. release = celery.__version__
  53. exclude_trees = ['.build']
  54. # If true, '()' will be appended to :func: etc. cross-reference text.
  55. add_function_parentheses = True
  56. intersphinx_mapping = {
  57. 'python': ('http://docs.python.org/dev/', None),
  58. 'sphinx': ('http://www.sphinx-doc.org/en/stable/', None),
  59. 'kombu': ('http://kombu.readthedocs.org/en/master/', None),
  60. 'djcelery': ('http://django-celery.readthedocs.org/en/latest/', None),
  61. 'cyme': ('http://cyme.readthedocs.org/en/latest/', None),
  62. 'amqp': ('http://amqp.readthedocs.org/en/latest/', None),
  63. 'vine': ('http://vine.readthedocs.org/en/latest/', None),
  64. 'flower': ('http://flower.readthedocs.org/en/latest/', None),
  65. 'redis': ('http://redis-py.readthedocs.org/en/latest/', None),
  66. 'django': ('http://django.readthedocs.org/en/latest/', None),
  67. 'boto': ('http://boto.readthedocs.org/en/latest/', None),
  68. 'sqlalchemy': ('http://sqlalchemy.readthedocs.org/en/latest', None),
  69. 'kazoo': ('http://kazoo.readthedocs.org/en/latest/', None),
  70. 'pyzmq': ('http://pyzmq.readthedocs.org/en/latest/', None),
  71. 'msgpack': ('http://pythonhosted.org/msgpack-python/', None),
  72. 'riak': ('http://basho.github.io/riak-python-client/', None),
  73. 'pylibmc': ('http://sendapatch.se/projects/pylibmc/', None),
  74. 'eventlet': ('http://eventlet.net/doc/', None),
  75. 'gevent': ('http://gevent.org/', None),
  76. 'pyOpenSSL': ('http://pyopenssl.readthedocs.org/en/stable/', None),
  77. }
  78. # The name of the Pygments (syntax highlighting) style to use.
  79. pygments_style = 'colorful'
  80. # Add any paths that contain custom static files (such as style sheets) here,
  81. # relative to this directory. They are copied after the builtin static files,
  82. # so a file named "default.css" will overwrite the builtin "default.css".
  83. html_static_path = ['.static']
  84. html_use_smartypants = True
  85. add_module_names = True
  86. highlight_language = 'python3'
  87. # If false, no module index is generated.
  88. html_use_modindex = True
  89. # If false, no index is generated.
  90. html_use_index = True
  91. latex_documents = [
  92. ('index', 'Celery.tex', 'Celery Documentation',
  93. 'Ask Solem & Contributors', 'manual'),
  94. ]
  95. html_theme = 'celery'
  96. html_theme_path = ['_theme']
  97. html_sidebars = {
  98. 'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
  99. '**': ['sidebarlogo.html', 'relations.html',
  100. 'sourcelink.html', 'searchbox.html'],
  101. }
  102. # ## Issuetracker
  103. github_project = 'celery/celery'
  104. # -- Options for Epub output -------------------------------------------
  105. # Bibliographic Dublin Core info.
  106. epub_title = 'Celery Manual, Version {0}'.format(version)
  107. epub_author = 'Ask Solem'
  108. epub_publisher = 'Celery Project'
  109. epub_copyright = '2009-2014'
  110. # The language of the text. It defaults to the language option
  111. # or en if the language is not set.
  112. epub_language = 'en'
  113. # The scheme of the identifier. Typical schemes are ISBN or URL.
  114. epub_scheme = 'ISBN'
  115. # The unique identifier of the text. This can be a ISBN number
  116. # or the project homepage.
  117. epub_identifier = 'celeryproject.org'
  118. # A unique identification for the text.
  119. epub_uid = 'Celery Manual, Version {0}'.format(version)
  120. # ## HTML files that should be inserted before the pages created by sphinx.
  121. # ## The format is a list of tuples containing the path and title.
  122. # epub_pre_files = []
  123. # ## HTML files shat should be inserted after the pages created by sphinx.
  124. # ## The format is a list of tuples containing the path and title.
  125. # epub_post_files = []
  126. # A list of files that should not be packed into the epub file.
  127. epub_exclude_files = ['search.html']
  128. # The depth of the table of contents in toc.ncx.
  129. epub_tocdepth = 3