diff options
author | Calum Lind <calumlind@gmail.com> | 2019-03-29 10:18:02 +0000 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2019-03-29 14:27:18 +0000 |
commit | 02e07dda2a9b44b0fa7c62f11822c2bee5e4e148 (patch) | |
tree | 9428b0be42af405521114487a23fc9da0c255255 | |
parent | b2e19561e6cc988f280ad896b3680e81d9a23b28 (diff) | |
download | deluge-02e07dda2a9b44b0fa7c62f11822c2bee5e4e148.tar.gz deluge-02e07dda2a9b44b0fa7c62f11822c2bee5e4e148.tar.bz2 deluge-02e07dda2a9b44b0fa7c62f11822c2bee5e4e148.zip |
[Docs] Fix recommonmark monkey patch and pin version
The refactored patch did not work so revert it.
A new release of recommonmark breaks the docs build so pin it to working version.
-rw-r--r-- | docs/source/conf.py | 15 | ||||
-rw-r--r-- | requirements-docs.txt | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py index 78377f5c0..ccc3b33e3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,18 +26,17 @@ try: except ImportError: get_version = None +# Monkey patch to fix recommonmark 0.4 doc reference issues. +orig_run_role = DummyStateMachine.run_role -# Monkey patch -class PatchDummyStateMachine(DummyStateMachine): - """Fix recommonmark 0.4 doc reference issues.""" - def run_role(self, name, *args, **kwargs): - if name == 'doc': - name = 'any' - return DummyStateMachine.run_role(self, name, *args, **kwargs) +def run_role(self, name, options=None, content=None): + if name == 'doc': + name = 'any' + return orig_run_role(self, name, options, content) -DummyStateMachine = PatchDummyStateMachine +DummyStateMachine.run_role = run_role # Must add these for autodoc to import packages successully __builtin__.__dict__['_'] = lambda x: x diff --git a/requirements-docs.txt b/requirements-docs.txt index e5437fc13..e23c1e1e3 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,3 +1,3 @@ sphinx==1.7.* -recommonmark +recommonmark==0.4.* sphinx_rtd_theme |