2013-09-20 22:46:43 +00:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
2013-11-20 20:37:22 +00:00
|
|
|
mozilla_dir = os.environ['MOZILLA_DIR']
|
2013-09-20 22:46:43 +00:00
|
|
|
|
|
|
|
import mdn_theme
|
|
|
|
|
|
|
|
extensions = [
|
|
|
|
'sphinx.ext.autodoc',
|
2013-09-24 00:21:10 +00:00
|
|
|
'sphinx.ext.graphviz',
|
2013-09-24 18:50:04 +00:00
|
|
|
'sphinx.ext.todo',
|
2013-10-10 17:35:44 +00:00
|
|
|
'mozbuild.sphinx',
|
2013-09-20 22:46:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
templates_path = ['_templates']
|
|
|
|
source_suffix = '.rst'
|
|
|
|
master_doc = 'index'
|
2013-11-20 20:37:22 +00:00
|
|
|
project = u'Mozilla Source Tree Docs'
|
2013-09-20 22:46:43 +00:00
|
|
|
year = datetime.now().year
|
|
|
|
|
|
|
|
# Grab the version from the source tree's milestone.
|
2013-11-20 20:37:22 +00:00
|
|
|
# FUTURE Use Python API from bug 941299.
|
2013-09-20 22:46:43 +00:00
|
|
|
with open(os.path.join(mozilla_dir, 'config', 'milestone.txt'), 'rt') as fh:
|
|
|
|
for line in fh:
|
|
|
|
line = line.strip()
|
|
|
|
|
|
|
|
if not line or line.startswith('#'):
|
|
|
|
continue
|
|
|
|
|
|
|
|
release = line
|
|
|
|
break
|
|
|
|
|
|
|
|
version = re.sub(r'[ab]\d+$', '', release)
|
|
|
|
|
|
|
|
exclude_patterns = ['_build']
|
|
|
|
pygments_style = 'sphinx'
|
|
|
|
|
|
|
|
html_theme_path = [mdn_theme.get_theme_dir()]
|
|
|
|
html_theme = 'mdn'
|
|
|
|
|
|
|
|
html_static_path = ['_static']
|
2013-11-20 20:37:22 +00:00
|
|
|
htmlhelp_basename = 'MozillaTreeDocs'
|