14 SPHINX_VERSION_REQUIRED =
"1.0.8"
15 RST2PDF_VERSION_REQUIRED =
"0.14.2"
21 from datetime
import datetime
22 from pkg_resources
import parse_version
29 if parse_version(sphinx.__version__) < parse_version(SPHINX_VERSION_REQUIRED):
30 print 'sphinx version is old. %s is requred. exec "easy_install -U sphinx"' % SPHINX_VERSION_REQUIRED
46 if parse_version(rst2pdf.version) >= parse_version(RST2PDF_VERSION_REQUIRED):
47 extensions.append(
'sphinx.ext.autodoc')
48 extensions.append(
'rst2pdf.pdfbuilder')
53 templates_path = [
'templates']
56 source_suffix =
'.txt'
66 copyright =
u'2009-' + unicode(datetime.today().year) +
', Brazil, Inc'
74 version = os.environ[
"DOCUMENT_VERSION"]
76 release = os.environ[
"DOCUMENT_VERSION_FULL"]
79 locale_dirs = [
"../locale"]
83 language = os.environ[
'LOCALE']
85 locale_dir = os.path.dirname(__file__) +
"/../locale"
87 catalog = gettext.Catalog(
"conf", localedir=locale_dir, languages=[language])
90 _ =
lambda msgid: msgid
100 exclude_patterns = [
'_build',
'commands_not_implemented']
117 pygments_style =
'sphinx'
127 html_theme =
'groonga'
132 html_theme_options = {
133 'rightsidebar':
'true',
134 'stickysidebar':
'true',
143 'bodyfont':
'#666666',
146 html_context = {
"language": language}
149 html_theme_path = [
"../themes"]
153 html_title_format = unicode(
_(
"%(project)s v%(release)s documentation"),
"utf-8")
154 html_title = html_title_format % {
"project": project,
155 "release": unicode(release,
"utf-8")}
180 html_use_smartypants =
False
202 html_show_sphinx =
False
213 htmlhelp_basename =
'groongadoc'
227 (
'index',
'groonga.tex', unicode(
_(
'Groonga documentation'),
"utf-8"),
228 u'Brazil, Inc',
'manual'),
251 u'Groonga-%s' % (release,),
253 unicode(
_(
'Groonga Project'),
"utf-8"))
255 pdf_stylesheets = [
'sphinx',
'kerning',
'a4']
256 if 'language' in dir():
257 pdf_language = language
258 pdf_stylesheets += [
'styles/pdf/%s' % pdf_language]
260 for root, dirs, files
in os.walk(
'/usr/share/fonts'):
261 pdf_font_path += map(lambda(dir): os.path.join(root, dir), dirs)
262 pdf_fit_mode =
"shrink"
263 pdf_inline_footnotes =
True
270 (
'index',
'Groonga', unicode(
_(
'Groonga documentation'),
"utf-8"),
271 [
u'Groonga Project'], 1)