mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
[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.
This commit is contained in:
parent
b2e19561e6
commit
02e07dda2a
2 changed files with 10 additions and 11 deletions
|
@ -26,18 +26,17 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
get_version = None
|
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):
|
def run_role(self, name, options=None, content=None):
|
||||||
if name == 'doc':
|
if name == 'doc':
|
||||||
name = 'any'
|
name = 'any'
|
||||||
return DummyStateMachine.run_role(self, name, *args, **kwargs)
|
return orig_run_role(self, name, options, content)
|
||||||
|
|
||||||
|
|
||||||
DummyStateMachine = PatchDummyStateMachine
|
DummyStateMachine.run_role = run_role
|
||||||
|
|
||||||
# Must add these for autodoc to import packages successully
|
# Must add these for autodoc to import packages successully
|
||||||
__builtin__.__dict__['_'] = lambda x: x
|
__builtin__.__dict__['_'] = lambda x: x
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
sphinx==1.7.*
|
sphinx==1.7.*
|
||||||
recommonmark
|
recommonmark==0.4.*
|
||||||
sphinx_rtd_theme
|
sphinx_rtd_theme
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue