Skip to content

Commit

Permalink
[doc] minor fixs (apache#3067)
Browse files Browse the repository at this point in the history
  • Loading branch information
aileli authored and mli committed Aug 19, 2016
1 parent 13257ce commit ab5211f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
19 changes: 3 additions & 16 deletions docs/sphinx_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
import docutils
import subprocess

READTHEDOCS_BUILD = (os.environ.get('READTHEDOCS', None) is not None)

def run_build_mxnet(folder):
"""Run the doxygen make command in the designated folder."""
try:
if READTHEDOCS_BUILD:
subprocess.call('cd %s; cp make/readthedocs.mk config.mk' % folder, shell = True)
subprocess.call('cd %s; rm -rf build' % folder, shell = True)
retcode = subprocess.call("cd %s; make" % folder, shell = True)
subprocess.call('cd %s; cp make/readthedocs.mk config.mk' % folder, shell = True)
subprocess.call('cd %s; rm -rf build' % folder, shell = True)
retcode = subprocess.call("cd %s; make -j$(nproc)" % folder, shell = True)
if retcode < 0:
sys.stderr.write("build terminated by signal %s" % (-retcode))
except OSError as e:
Expand All @@ -25,19 +22,9 @@ def run_build_mxnet(folder):
else:
subprocess.call('cd ../recommonmark/; git pull', shell=True)

if not os.path.exists('web-data'):
subprocess.call('rm -rf web-data;' +
'git clone https://github.com/dmlc/web-data', shell = True)
else:
subprocess.call('cd web-data; git pull', shell=True)


curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
root_path = os.path.join(curr_path, '..')
run_build_mxnet(root_path)
sys.stderr.write('READTHEDOCS=%s\n' % (READTHEDOCS_BUILD))



sys.path.insert(0, os.path.abspath('../recommonmark/'))

Expand Down
3 changes: 3 additions & 0 deletions make/readthedocs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ USE_S3 = 0

# path to libjvm.so
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server

# uses O0 instead of O3 for better performance
DEBUG = 1

0 comments on commit ab5211f

Please sign in to comment.