Codebase list rabit / 7c3bcbf5-ac8c-4921-8f2a-3d63b208b357/main doc / sphinx_util.py
7c3bcbf5-ac8c-4921-8f2a-3d63b208b357/main

Tree @7c3bcbf5-ac8c-4921-8f2a-3d63b208b357/main (Download .tar.gz)

sphinx_util.py @7c3bcbf5-ac8c-4921-8f2a-3d63b208b357/mainraw · history · blame

# -*- coding: utf-8 -*-
"""Helper utilty function for customization."""
import sys
import os
import docutils
import subprocess

if os.environ.get('READTHEDOCS', None) == 'True':
    subprocess.call('cd ..; rm -rf recommonmark;' +
                    'git clone https://github.com/tqchen/recommonmark', shell=True)

sys.path.insert(0, os.path.abspath('../recommonmark/'))
from recommonmark import parser, transform

MarkdownParser = parser.CommonMarkParser
AutoStructify = transform.AutoStructify