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

Commit

Permalink
Merge pull request #224 from bsipocz/sphinx_fix_deprecations
Browse files Browse the repository at this point in the history
Fixed one of the warnings raised by sphinx 1.4
  • Loading branch information
eteq committed Apr 15, 2016
2 parents 19c6096 + ee8780c commit 3a1f799
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions astropy_helpers/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

from os import path

import sphinx
from distutils.version import LooseVersion


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

Expand All @@ -28,11 +31,8 @@


def check_sphinx_version(expected_version):
import sphinx
from distutils import version

sphinx_version = version.LooseVersion(sphinx.__version__)
expected_version = version.LooseVersion(expected_version)
sphinx_version = LooseVersion(sphinx.__version__)
expected_version = LooseVersion(expected_version)
if sphinx_version < expected_version:
raise RuntimeError(
"At least Sphinx version {0} is required to build this "
Expand Down Expand Up @@ -134,8 +134,10 @@ def check_sphinx_version(expected_version):

if on_rtd:
extensions.append('sphinx.ext.mathjax')
else:
elif LooseVersion(sphinx.__version__) < LooseVersion('1.4'):
extensions.append('sphinx.ext.pngmath')
else:
extensions.append('sphinx.ext.imgmath')


# Above, we use a patched version of viewcode rather than 'sphinx.ext.viewcode'
Expand Down

0 comments on commit 3a1f799

Please sign in to comment.