From bfa4dba15485b4192f8bbe13345e9658c97ecf76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Sat, 7 Oct 2017 07:59:01 +0200 Subject: New upstream version 0.6.0+dfsg --- doc/source/conf.py | 59 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 15 deletions(-) (limited to 'doc/source/conf.py') diff --git a/doc/source/conf.py b/doc/source/conf.py index 30abf54..e724d3c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,18 +1,40 @@ # -*- coding: utf-8 -*- +# /*########################################################################## +# Copyright (C) 2015-2017 European Synchrotron Radiation Facility # -# silx documentation build configuration file, created by -# sphinx-quickstart on Fri Nov 27 14:20:46 2015. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# This file is execfile()d with the current directory set to its containing dir. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# Note that not all possible configuration values are present in this -# autogenerated file. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. # -# All configuration values have a default; values that are commented out -# serve to show the default. +# ############################################################################*/ +"""silx documentation build configuration file, created by +sphinx-quickstart on Fri Nov 27 14:20:46 2015. + +This file is execfile()d with the current directory set to its containing dir. + +Note that not all possible configuration values are present in this +autogenerated file. + +All configuration values have a default; values that are commented out +serve to show the default.""" import sys import os +import os.path import glob import subprocess @@ -20,11 +42,18 @@ import subprocess # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) -dirname = os.path.dirname -root_dir = dirname(dirname(dirname(os.path.abspath(__file__)))) -import silx -source_dir = dirname(dirname(silx.__file__)) -os.environ["PYTHONPATH"] = source_dir + os.pathsep + os.environ.get("PYTHONPATH", "") +project = u'silx' +try: + import silx + project_dir = os.path.abspath(os.path.join(__file__, "..", "..", "..")) + build_dir = os.path.abspath(silx.__file__) + if not build_dir.startswith(project_dir): + raise RuntimeError("%s looks to come from the system. Fix your PYTHONPATH and restart sphinx." % project) +except ImportError: + raise RuntimeError("%s is not on the path. Fix your PYTHONPATH and restart sphinx." % project) + +# Add local sphinx extension directory +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ext')) # -- General configuration ----------------------------------------------------- @@ -38,7 +67,8 @@ extensions = [ 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx.ext.doctest' + 'sphinx.ext.doctest', + 'sphinxext-archive' ] autodoc_member_order = 'bysource' @@ -56,7 +86,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'silx' from silx._version import strictversion, version, __date__ as _date year = _date.split("/")[-1] copyright = u'2015-%s, Data analysis unit, European Synchrotron Radiation Facility, Grenoble' % year @@ -138,7 +167,7 @@ html_favicon = "img/silx.ico" # 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, # so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] +# html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -- cgit v1.2.3