conf.py 5.0 KB

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