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.3'
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#
103html_theme = 'classic'
104# html_theme_options = {}
105
106# Add any paths that contain custom static files (such as style sheets) here,
107# relative to this directory. They are copied after the builtin static files,
108# so a file named "default.css" will overwrite the builtin "default.css".
109# html_static_path = ['sphinx/static']
110
111# Custom sidebar templates, must be a dictionary that maps document names
112# to template names.
113#
114# This is required for the alabaster theme
115# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
116html_sidebars = {
117	'**': [
118	    'relations.html',  # needs 'show_related': True theme option to display
119	    'searchbox.html',
120	]
121}
122
123html_logo = 'logo.svg'
124
125# -- Options for HTMLHelp output ------------------------------------------
126
127# Output file base name for HTML help builder.
128htmlhelp_basename = 'sparsedoc'
129
130
131# -- Options for LaTeX output ---------------------------------------------
132
133latex_elements = {
134	# The paper size ('letterpaper' or 'a4paper').
135	#
136	'papersize': 'a4paper',
137
138	# The font size ('10pt', '11pt' or '12pt').
139	#
140	# 'pointsize': '10pt',
141
142	# Additional stuff for the LaTeX preamble.
143	#
144	# 'preamble': '',
145
146	# Latex figure (float) alignment
147	#
148	# 'figure_align': 'htbp',
149}
150
151# Grouping the document tree into LaTeX files. List of tuples
152# (source start file, target name, title,
153#  author, documentclass [howto, manual, or own class]).
154latex_documents = [
155	('index', 'sparse.tex', u'sparse Documentation', author, 'manual'),
156]
157
158
159# -- Options for manual page output ---------------------------------------
160
161# One entry per manual page. List of tuples
162# (source start file, name, description, authors, manual section).
163man_pages = [
164	('dev-options', 'dev-options', u'options for development', [author], 1),
165]
166
167
168# -- Options for Texinfo output -------------------------------------------
169
170# Grouping the document tree into Texinfo files. List of tuples
171# (source start file, target name, title, author,
172#  dir menu entry, description, category)
173texinfo_documents = [
174	('index', 'sparse', u'sparse Documentation', author, 'sparse', 'C semantic parser & checker', 'Software development'),
175]
176
177
178# vim: tabstop=4
179