• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- coding: utf-8 -*-
2#
3# This file is execfile()d with the current directory set to its
4# containing dir.
5#
6# Note that not all possible configuration values are present in this
7# autogenerated file.
8#
9# All configuration values have a default; values that are commented out
10# serve to show the default.
11
12# If extensions (or modules to document with autodoc) are in another
13# directory, add these directories to sys.path here. If the directory
14# is relative to the documentation root, use os.path.abspath to make
15# it absolute, like shown here.
16# sys.path.insert(0, os.path.abspath('.'))
17
18import os
19import sys
20import datetime
21
22# -- General configuration ------------------------------------------------
23
24needs_sphinx = '1.7'
25
26# Add any Sphinx extension module names here, as strings. They can be
27# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28# ones.
29sys.path.insert(0, os.path.abspath('sphinx'))
30extensions = [
31	'cdoc'
32	, 'ir'
33]
34
35# support .md with python2 & python3
36if sys.version_info[0] > 2:
37    from recommonmark.parser import CommonMarkParser
38    source_parsers = {
39        '.md': CommonMarkParser,
40    }
41else:
42    source_parsers = {
43        '.md': 'recommonmark.parser.CommonMarkParser',
44    }
45
46# Add any paths that contain templates here, relative to this directory.
47templates_path = ['templates']
48
49# The suffix(es) of source filenames.
50# You can specify multiple suffix as a list of string:
51#
52source_suffix = ['.rst', '.md']
53
54# The master toctree document.
55master_doc = 'index'
56
57# General information about the project.
58project = 'sparse'
59copyright = '2003 - ' + str(datetime.datetime.now().year)
60author = "sparse's development community"
61
62# The version info for the project you're documenting, acts as replacement for
63# |version| and |release|, also used in various other places throughout the
64# built documents.
65#
66# The full version, including alpha/beta/rc tags.
67release = next(open('../Makefile', 'r')).split('=')[1].rstrip()
68# The short X.Y version.
69version = release.split('-')[0]
70
71# it's a C project, so:
72primary_domain = 'c'
73# disable syntax highlight in non-code sections
74highlight_language = 'none'
75
76# The language for content autogenerated by Sphinx. Refer to documentation
77# for a list of supported languages.
78#
79# This is also used if you do content translation via gettext catalogs.
80# Usually you set "language" from the command line for these cases.
81language = None
82
83# List of patterns, relative to source directory, that match files and
84# directories to ignore when looking for source files.
85# This patterns also effect to html_static_path and html_extra_path
86exclude_patterns = ['build']
87
88# The name of the Pygments (syntax highlighting) style to use.
89pygments_style = 'sphinx'
90
91# If true, `todo` and `todoList` produce output, else they produce nothing.
92todo_include_todos = True
93
94# -- Options for cdoc extension -------------------------------------------
95
96cdoc_srcdir = '..'
97
98# -- Options for HTML output ----------------------------------------------
99
100# The theme to use for HTML and HTML Help pages.  See the documentation for
101# a list of builtin themes.
102#
103try:
104	html_theme = 'sphinx_rtd_theme'
105	import sphinx_rtd_theme
106	html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
107except:
108	sys.stderr.write("Warning: theme '%s' not found\n" % html_theme)
109	html_theme = 'classic'
110
111# html_theme_options = {}
112
113# Add any paths that contain custom static files (such as style sheets) here,
114# relative to this directory. They are copied after the builtin static files,
115# so a file named "default.css" will overwrite the builtin "default.css".
116html_static_path = ['sphinx/static']
117
118html_context = {
119    'css_files': [
120        '_static/theme_overrides.css',
121    ],
122}
123
124# Custom sidebar templates, must be a dictionary that maps document names
125# to template names.
126#
127# This is required for the alabaster theme
128# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
129html_sidebars = { }
130
131html_logo = 'logo.svg'
132
133# -- Options for HTMLHelp output ------------------------------------------
134
135# Output file base name for HTML help builder.
136htmlhelp_basename = 'sparsedoc'
137
138
139# -- Options for LaTeX output ---------------------------------------------
140
141latex_elements = {
142	# The paper size ('letterpaper' or 'a4paper').
143	#
144	'papersize': 'a4paper',
145
146	# The font size ('10pt', '11pt' or '12pt').
147	#
148	# 'pointsize': '10pt',
149
150	# Additional stuff for the LaTeX preamble.
151	#
152	# 'preamble': '',
153
154	# Latex figure (float) alignment
155	#
156	# 'figure_align': 'htbp',
157}
158
159# Grouping the document tree into LaTeX files. List of tuples
160# (source start file, target name, title,
161#  author, documentclass [howto, manual, or own class]).
162latex_documents = [
163	('index', 'sparse.tex', u'sparse Documentation', author, 'manual'),
164]
165
166
167# -- Options for manual page output ---------------------------------------
168
169# One entry per manual page. List of tuples
170# (source start file, name, description, authors, manual section).
171man_pages = [
172	('dev-options', 'dev-options', u'options for development', [author], 1),
173]
174
175
176# -- Options for Texinfo output -------------------------------------------
177
178# Grouping the document tree into Texinfo files. List of tuples
179# (source start file, target name, title, author,
180#  dir menu entry, description, category)
181texinfo_documents = [
182	('index', 'sparse', u'sparse Documentation', author, 'sparse', 'C semantic parser & checker', 'Software development'),
183]
184
185
186# vim: tabstop=4
187