Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Update for 2.18.9 point release
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 27, 2017
1 parent 2b6a58e commit bacad98
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 91 deletions.
151 changes: 78 additions & 73 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys
import os

import sphinx.environment
from docutils.utils import get_source_line
Expand All @@ -27,15 +28,15 @@
# those with ours
# CEVEAT: conflicting vars??
try:
from docs_conf import *
from docs_conf import * # NOQA
except ImportError:
print "docs_conf.py not available, building website without documentation part"
print("docs_conf.py not available, building website without documentation part")


# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand All @@ -48,14 +49,14 @@
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'site/index'

# General information about the project.
project = u'QGIS'
copyright = u'{0}, QGIS Contributors'.format( datetime.now().year )
copyright = u'{0}, QGIS Contributors'.format(datetime.now().year)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -65,10 +66,10 @@

# latest release
version = '2.18'
release = '2.18.8'
release = '2.18.9'
codename = u'Las Palmas'
binary = '1'
releasedate = date(2017,5,19)
releasedate = date(2017, 5, 26)
releasenote = "(LTR candidate)" # u"\u200B"

# long term release
Expand All @@ -82,44 +83,44 @@
nextfreezedate = None # datetime(2016,9,16, 12, 0, 0).strftime('%Y-%m-%d %H:%M:%S UTC')
nextreleasedate = None # datetime(2016,10,21, 12, 0, 0).strftime('%Y-%m-%d %H:%M:%S UTC')

nextpointreleasedate = datetime(2017, 5, 26, 12, 0, 0).strftime('%Y-%m-%d %H:%M:%S UTC')
nextpointreleasedate = datetime(2017, 6, 23, 12, 0, 0).strftime('%Y-%m-%d %H:%M:%S UTC')

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['../output', "../i18n", "../resources", "../scripts", "../ext", "../virtualenv"]

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# keep_warnings = False


# -- Options for HTML output ---------------------------------------------------
Expand All @@ -135,23 +136,23 @@
}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = ""

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = '../resources/en/common/logo.png'
html_logo = '../resources/en/common/logo.png'

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -164,70 +165,70 @@

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'site/index': [],
'site/**': ['myglobaltoc.html'],
#'site/about/**': ['myglobaltoc.html'],
#'site/about/index': [],
#'site/forusers/**': ['myglobaltoc.html'],
#'site/forusers/index': [],
#'site/forusers/download': [],
#'site/getinvolved/**': ['myglobaltoc.html'],
#'site/getinvolved/index': [],
#'site/getinvolved/donations': [],
# 'site/about/**': ['myglobaltoc.html'],
# 'site/about/index': [],
# 'site/forusers/**': ['myglobaltoc.html'],
# 'site/forusers/index': [],
# 'site/forusers/download': [],
# 'site/getinvolved/**': ['myglobaltoc.html'],
# 'site/getinvolved/index': [],
# 'site/getinvolved/donations': [],
'docs/**': ['myglobaltoc.html'],
'docs/index': [],
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'QGISWebsitedoc'

# if we have a conf.py from the QGIS-Documentation, most parameters can be
# overriden, but we concat the rst_prolog and rst_epilig, to
#docs_rst_prolog = ""
#if "rst_prolog" in locals():
# docs_rst_prolog = rst_prolog
#rst_prolog = docs_rst_prolog + """
#.. role:: disclaimer
#.. |updatedisclaimer| replace:: :disclaimer:`DISCLAIMER: This section of the user guide has not yet been updated for QGIS 2.0`
#"""
# overidden, but we concat the rst_prolog and rst_epilig, to
# docs_rst_prolog = ""
# if "rst_prolog" in locals():
# docs_rst_prolog = rst_prolog
# rst_prolog = docs_rst_prolog + """
# .. role:: disclaimer
# .. |updatedisclaimer| replace:: :disclaimer:`DISCLAIMER: This section of the user guide has not yet been updated for QGIS 2.0`
# """
#
docs_rst_epilog = ""
if "rst_epilog" in locals():
docs_rst_epilog = rst_epilog
docs_rst_epilog = rst_epilog # NOQA

rst_epilog = docs_rst_epilog + """
.. |checkbox| image:: /static/site/common/checkbox.png
Expand All @@ -239,42 +240,42 @@
# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'QGISWebsite.tex', u'QGIS Website Documentation',
u'QGIS Contributors', 'manual'),
('index', 'QGISWebsite.tex', u'QGIS Website Documentation',
u'QGIS Contributors', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True


# -- Options for manual page output --------------------------------------------
Expand All @@ -287,7 +288,7 @@
]

# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False


# -- Options for Texinfo output ------------------------------------------------
Expand All @@ -296,26 +297,27 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'QGISWebsite', u'QGIS Website Documentation',
u'QGIS Contributors', 'QGISWebsite', 'One line description of project.',
'Miscellaneous'),
('index', 'QGISWebsite', u'QGIS Website Documentation',
u'QGIS Contributors', 'QGISWebsite', 'One line description of project.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# texinfo_no_detailmenu = False

locale_dirs = ['../i18n/']
gettext_compact = False


def setup(app):
app.add_config_value('codename', None, 'env')
app.add_config_value('releasedate', None, 'env')
Expand All @@ -330,6 +332,7 @@ def setup(app):
app.add_config_value('binary', None, 'env')
app.add_config_value('ltrbinary', None, 'env')


context = {
'codename': codename,
'releasedate': releasedate,
Expand All @@ -346,15 +349,17 @@ def setup(app):
'ltrbinary': ltrbinary,
}

rst_epilog += "\n".join( map( lambda x: ".. |%s| replace:: %s" % (x,context[x]), context.keys()) )
rst_epilog += "\n".join(map(lambda x: ".. |%s| replace:: %s" % (x, context[x]), context.keys()))

if 'html_context' in globals():
html_context.update(context)
html_context.update(context) # NOQA
else:
html_context = context


def _warn_node(self, msg, node):
if not msg.startswith('nonlocal image URI found:') or "paypal" not in msg:
self._warnfunc(msg, '%s:%s' % get_source_line(node))


sphinx.environment.BuildEnvironment.warn_node = _warn_node
Loading

0 comments on commit bacad98

Please sign in to comment.