1# -*- coding: utf-8 -*-
2#
3# PyObjC-Core documentation build configuration file, created by
4# sphinx-quickstart on Tue Dec 22 15:20:27 2009.
5#
6# This file is execfile()d with the current directory set to its containing dir.
7#
8# Note that not all possible configuration values are present in this
9# autogenerated file.
10#
11# All configuration values have a default; values that are commented out
12# serve to show the default.
13
14import sys, os
15
16# If extensions (or modules to document with autodoc) are in another directory,
17# add these directories to sys.path here. If the directory is relative to the
18# documentation root, use os.path.abspath to make it absolute, like shown here.
19#sys.path.append(os.path.abspath('.'))
20
21# -- General configuration -----------------------------------------------------
22
23# Add any Sphinx extension module names here, as strings. They can be extensions
24# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
25extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', 'rst2pdf.pdfbuilder']
26
27# Add any paths that contain templates here, relative to this directory.
28templates_path = ['sphinx_templates']
29
30# The suffix of source filenames.
31source_suffix = '.rst'
32
33# The encoding of source files.
34#source_encoding = 'utf-8'
35
36# The master toctree document.
37master_doc = 'index'
38
39# General information about the project.
40project = u'PyObjC-Core'
41copyright = u'2009-2012, Ronald Oussoren'
42
43# The version info for the project you're documenting, acts as replacement for
44# |version| and |release|, also used in various other places throughout the
45# built documents.
46#
47# The short X.Y version.
48def package_version():
49    import os
50    topdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
51    fp = open(os.path.join(topdir, 'Modules', 'objc', 'pyobjc.h'), 'r')
52    for ln in fp.readlines():
53        if ln.startswith('#define OBJC_VERSION'):
54            fp.close()
55            return ln.split()[-1][1:-1]
56    raise RuntimeError("No version?")
57
58version = package_version()
59# The full version, including alpha/beta/rc tags.
60release = version
61
62# The language for content autogenerated by Sphinx. Refer to documentation
63# for a list of supported languages.
64#language = None
65
66# There are two options for replacing |today|: either, you set today to some
67# non-false value, then it is used:
68#today = ''
69# Else, today_fmt is used as the format for a strftime call.
70#today_fmt = '%B %d, %Y'
71
72# List of documents that shouldn't be included in the build.
73#unused_docs = []
74
75# List of directories, relative to source directory, that shouldn't be searched
76# for source files.
77exclude_trees = ['sphinx_build']
78
79# The reST default role (used for this markup: `text`) to use for all documents.
80#default_role = None
81
82# If true, '()' will be appended to :func: etc. cross-reference text.
83#add_function_parentheses = True
84
85# If true, the current module name will be prepended to all description
86# unit titles (such as .. function::).
87#add_module_names = True
88
89# If true, sectionauthor and moduleauthor directives will be shown in the
90# output. They are ignored by default.
91#show_authors = False
92
93# The name of the Pygments (syntax highlighting) style to use.
94pygments_style = 'sphinx'
95
96# A list of ignored prefixes for module index sorting.
97#modindex_common_prefix = []
98
99
100# -- Options for HTML output ---------------------------------------------------
101
102# The theme to use for HTML and HTML Help pages.  Major themes that come with
103# Sphinx are currently 'default' and 'sphinxdoc'.
104html_theme = 'default'
105
106# Theme options are theme-specific and customize the look and feel of a theme
107# further.  For a list of options available for each theme, see the
108# documentation.
109#html_theme_options = {}
110
111# Add any paths that contain custom themes here, relative to this directory.
112#html_theme_path = []
113
114# The name for this set of Sphinx documents.  If None, it defaults to
115# "<project> v<release> documentation".
116#html_title = None
117
118# A shorter title for the navigation bar.  Default is the same as html_title.
119#html_short_title = None
120
121# The name of an image file (relative to this directory) to place at the top
122# of the sidebar.
123#html_logo = None
124
125# The name of an image file (within the static path) to use as favicon of the
126# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
127# pixels large.
128#html_favicon = None
129
130# Add any paths that contain custom static files (such as style sheets) here,
131# relative to this directory. They are copied after the builtin static files,
132# so a file named "default.css" will overwrite the builtin "default.css".
133html_static_path = [] # ['sphinx_static']
134
135# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
136# using the given strftime format.
137#html_last_updated_fmt = '%b %d, %Y'
138
139# If true, SmartyPants will be used to convert quotes and dashes to
140# typographically correct entities.
141#html_use_smartypants = True
142
143# Custom sidebar templates, maps document names to template names.
144#html_sidebars = {}
145
146# Additional templates that should be rendered to pages, maps page names to
147# template names.
148#html_additional_pages = {}
149
150# If false, no module index is generated.
151#html_use_modindex = True
152
153# If false, no index is generated.
154#html_use_index = True
155
156# If true, the index is split into individual pages for each letter.
157#html_split_index = False
158
159# If true, links to the reST sources are added to the pages.
160#html_show_sourcelink = True
161
162# If true, an OpenSearch description file will be output, and all pages will
163# contain a <link> tag referring to it.  The value of this option must be the
164# base URL from which the finished HTML is served.
165#html_use_opensearch = ''
166
167# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
168#html_file_suffix = ''
169
170# Output file base name for HTML help builder.
171htmlhelp_basename = 'PyObjC-Coredoc'
172
173
174# -- Options for LaTeX output --------------------------------------------------
175
176# The paper size ('letter' or 'a4').
177#latex_paper_size = 'letter'
178
179# The font size ('10pt', '11pt' or '12pt').
180#latex_font_size = '10pt'
181
182# Grouping the document tree into LaTeX files. List of tuples
183# (source start file, target name, title, author, documentclass [howto/manual]).
184latex_documents = [
185  ('index', 'PyObjC-Core.tex', u'PyObjC-Core Documentation',
186   u'Ronald Oussoren', 'manual'),
187]
188
189# The name of an image file (relative to this directory) to place at the top of
190# the title page.
191#latex_logo = None
192
193# For "manual" documents, if this is true, then toplevel headings are parts,
194# not chapters.
195#latex_use_parts = False
196
197# Additional stuff for the LaTeX preamble.
198#latex_preamble = ''
199
200# Documents to append as an appendix to all manuals.
201#latex_appendices = []
202
203# If false, no module index is generated.
204#latex_use_modindex = True
205
206
207# Example configuration for intersphinx: refer to the Python standard library.
208intersphinx_mapping = {'http://docs.python.org/': None}
209
210
211# Settings for PDF generation
212pdf_documents = [
213    ('index', 'PyObjC-Core', 'PyObjC-Core', 'Ronald Oussoren'),
214]
215pdf_stylesheets = ['sphinx','a4']
216pdf_compressed = True
217pdf_language = 'en_US'
218pdf_fit_mode='shrink'
219pdf_splittables = True
220pdf_use_modindex = False
221pdf_use_index = True
222