conf.py 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. def linkcode_resolve(domain, info):
  34. if domain != 'py' or not info['module']:
  35. return
  36. filename = info['module'].replace('.', '/')
  37. return 'http://github.com/celery/celery/tree/master/%s.py' % (filename, )
  38. html_show_sphinx = False
  39. # Add any paths that contain templates here, relative to this directory.
  40. templates_path = ['.templates']
  41. # The suffix of source filenames.
  42. source_suffix = '.rst'
  43. # The master toctree document.
  44. master_doc = 'index'
  45. # General information about the project.
  46. project = u'Celery'
  47. copyright = u'2009-2013, Ask Solem & Contributors'
  48. # The version info for the project you're documenting, acts as replacement for
  49. # |version| and |release|, also used in various other places throughout the
  50. # built documents.
  51. #
  52. # The short X.Y version.
  53. version = ".".join(map(str, celery.VERSION[0:2]))
  54. # The full version, including alpha/beta/rc tags.
  55. release = celery.__version__
  56. exclude_trees = ['.build']
  57. # If true, '()' will be appended to :func: etc. cross-reference text.
  58. add_function_parentheses = True
  59. intersphinx_mapping = {
  60. 'python': ('http://docs.python.org/dev', None),
  61. 'kombu': ('http://kombu.readthedocs.org/en/latest/', None),
  62. 'djcelery': ('http://django-celery.readthedocs.org/en/latest', None),
  63. 'cyme': ('http://cyme.readthedocs.org/en/latest', None),
  64. 'amqp': ('http://amqp.readthedocs.org/en/latest', None),
  65. }
  66. # The name of the Pygments (syntax highlighting) style to use.
  67. pygments_style = 'colorful'
  68. # Add any paths that contain custom static files (such as style sheets) here,
  69. # relative to this directory. They are copied after the builtin static files,
  70. # so a file named "default.css" will overwrite the builtin "default.css".
  71. html_static_path = ['.static']
  72. html_use_smartypants = True
  73. # If false, no module index is generated.
  74. html_use_modindex = True
  75. # If false, no index is generated.
  76. html_use_index = True
  77. latex_documents = [
  78. ('index', 'Celery.tex', ur'Celery Documentation',
  79. ur'Ask Solem & Contributors', 'manual'),
  80. ]
  81. html_theme = "celery"
  82. html_theme_path = ["_theme"]
  83. html_sidebars = {
  84. 'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
  85. '**': ['sidebarlogo.html', 'relations.html',
  86. 'sourcelink.html', 'searchbox.html'],
  87. }
  88. ### Issuetracker
  89. if False:
  90. issuetracker = "github"
  91. issuetracker_project = "celery/celery"
  92. issuetracker_issue_pattern = r'[Ii]ssue #(\d+)'
  93. # -- Options for Epub output ---------------------------------------------------
  94. # Bibliographic Dublin Core info.
  95. epub_title = 'Celery Manual, Version 3.0'
  96. epub_author = 'Ask Solem'
  97. epub_publisher = 'Celery Project'
  98. epub_copyright = '2009-2013'
  99. # The language of the text. It defaults to the language option
  100. # or en if the language is not set.
  101. epub_language = 'en'
  102. # The scheme of the identifier. Typical schemes are ISBN or URL.
  103. epub_scheme = 'ISBN'
  104. # The unique identifier of the text. This can be a ISBN number
  105. # or the project homepage.
  106. epub_identifier = 'celeryproject.org'
  107. # A unique identification for the text.
  108. epub_uid = 'Celery Manual, Version 3.0'
  109. # HTML files that should be inserted before the pages created by sphinx.
  110. # The format is a list of tuples containing the path and title.
  111. #epub_pre_files = []
  112. # HTML files shat should be inserted after the pages created by sphinx.
  113. # The format is a list of tuples containing the path and title.
  114. #epub_post_files = []
  115. # A list of files that should not be packed into the epub file.
  116. epub_exclude_files = ['search.html']
  117. # The depth of the table of contents in toc.ncx.
  118. epub_tocdepth = 3