5
5
import docutils
6
6
import subprocess
7
7
8
- READTHEDOCS_BUILD = (os .environ .get ('READTHEDOCS' , None ) is not None )
9
-
10
8
def run_build_mxnet (folder ):
11
9
"""Run the doxygen make command in the designated folder."""
12
10
try :
13
- if READTHEDOCS_BUILD :
14
- subprocess .call ('cd %s; cp make/readthedocs.mk config.mk' % folder , shell = True )
15
- subprocess .call ('cd %s; rm -rf build' % folder , shell = True )
16
- retcode = subprocess .call ("cd %s; make" % folder , shell = True )
11
+ subprocess .call ('cd %s; cp make/readthedocs.mk config.mk' % folder , shell = True )
12
+ subprocess .call ('cd %s; rm -rf build' % folder , shell = True )
13
+ retcode = subprocess .call ("cd %s; make -j$(nproc)" % folder , shell = True )
17
14
if retcode < 0 :
18
15
sys .stderr .write ("build terminated by signal %s" % (- retcode ))
19
16
except OSError as e :
@@ -25,19 +22,9 @@ def run_build_mxnet(folder):
25
22
else :
26
23
subprocess .call ('cd ../recommonmark/; git pull' , shell = True )
27
24
28
- if not os .path .exists ('web-data' ):
29
- subprocess .call ('rm -rf web-data;' +
30
- 'git clone https://github.com/dmlc/web-data' , shell = True )
31
- else :
32
- subprocess .call ('cd web-data; git pull' , shell = True )
33
-
34
-
35
25
curr_path = os .path .dirname (os .path .abspath (os .path .expanduser (__file__ )))
36
26
root_path = os .path .join (curr_path , '..' )
37
27
run_build_mxnet (root_path )
38
- sys .stderr .write ('READTHEDOCS=%s\n ' % (READTHEDOCS_BUILD ))
39
-
40
-
41
28
42
29
sys .path .insert (0 , os .path .abspath ('../recommonmark/' ))
43
30
0 commit comments