This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository python-x2go. commit 26bfe2deaa13929e5e15dbf7566c7ff945c1fc92 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Jun 2 04:53:31 2018 +0200 docs/source/conf.py: drop minimum sphinx version requirement again, detect version manually and adapt config based on this information. --- debian/changelog | 2 ++ docs/source/conf.py | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8913498..5b9a18b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ python-x2go (0.5.99.1-0x2go1) UNRELEASED; urgency=medium * New upstream version (0.5.99.0): - docs/source/conf.py: set minimum sphinx version to 1.0. Needed for the sphinx.ext.viewcode extension. + - docs/source/conf.py: drop minimum sphinx version requirement again, + detect version manually and adapt config based on this information. * python-x2go.spec: - Also add fdupes package as a build dependency for RHEL-based distros. - Correctly pythonize package, for Fedora, RHEL/EPEL and OpenSuSE. It's diff --git a/docs/source/conf.py b/docs/source/conf.py index 0d0d679..a666c35 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,14 +20,17 @@ import os import sys sys.path.insert(0, os.path.abspath('../../')) import x2go +import distutils.version from datetime import date +sphinxver = distutils.version.LooseVersion(sphinx.__version__) + # -- 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 @@ -35,8 +38,11 @@ needs_sphinx = '1.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', - 'sphinx.ext.viewcode', ] +sphinx_want_ver = distutils.version.LooseVersion('1.0') +if sphinxver >= sphinx_want_ver: + extensions.append('sphinx.ext.viewcode') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -126,7 +132,11 @@ todo_include_todos = True # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'classic' +sphinx_want_ver = distutils.version.LooseVersion('1.3') +if sphinxver >= sphinx_want_ver: + html_theme = 'classic' +else + html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git