conf.py 4.7 KB

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