Commit 19e1b14 1 parent ddc2faa commit 19e1b14 Copy full SHA for 19e1b14
File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,15 @@ mxnet:
19
19
@echo " # Step 1: Building MXNet tutorials #"
20
20
@echo " # #"
21
21
@echo " ##################################################################"
22
- @DGLBACKEND=mxnet $(SPHINXBUILD ) -M html " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O ) \
23
- -D sphinx_gallery_conf.filename_pattern=" /*(?<=mx)\.py"
22
+ @DGLBACKEND=mxnet $(SPHINXBUILD ) -M html " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
24
23
25
24
pytorch :
26
25
@echo " ##################################################################"
27
26
@echo " # #"
28
27
@echo " # Step 2: Building PyTorch tutorials #"
29
28
@echo " # #"
30
29
@echo " ##################################################################"
31
- @DGLBACKEND=pytorch $(SPHINXBUILD ) -M html " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O ) \
32
- -D sphinx_gallery_conf.filename_pattern=" /*(?<!mx)\.py"
30
+ @DGLBACKEND=pytorch $(SPHINXBUILD ) -M html " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
33
31
34
32
html-noexec :
35
33
$(SPHINXBUILD ) -D plot_gallery=0 -b html " $( SOURCEDIR) " " $( BUILDDIR) /html"
Original file line number Diff line number Diff line change 213
213
'filename_pattern' : '.py' ,
214
214
'download_all_examples' : False ,
215
215
}
216
+
217
+ # Compatibility for different backend when builds tutorials
218
+ if os .environ ['DGLBACKEND' ] == 'mxnet' :
219
+ sphinx_gallery_conf ['filename_pattern' ] = "/*(?<=mx)\.py"
220
+ if os .environ ['DGLBACKEND' ] == 'pytorch' :
221
+ sphinx_gallery_conf ['filename_pattern' ] = "/*(?<!mx)\.py"
Original file line number Diff line number Diff line change
1
+ build :
2
+ image : latest
3
+
4
+ formats : []
5
+
6
+ python :
7
+ version : 3.6
8
+ use_system_site_packages : true
9
+ setup_py_install : false
You can’t perform that action at this time.
0 commit comments