You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/19 03:10:16 UTC

[GitHub] nswamy closed pull request #12236: Remove duplicate scala package runs during the website builds

nswamy closed pull request #12236: Remove duplicate scala package runs during the website builds
URL: https://github.com/apache/incubator-mxnet/pull/12236
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/mxdoc.py b/docs/mxdoc.py
index 33f64750e81..7092b9ee9ea 100644
--- a/docs/mxdoc.py
+++ b/docs/mxdoc.py
@@ -100,11 +100,15 @@ def build_r_docs(app):
     dest_path = app.builder.outdir + '/api/r/'
     _run_cmd('mkdir -p ' + dest_path + '; mv ' + pdf_path + ' ' + dest_path)
 
+def build_scala(app):
+    """build scala for scala docs and clojure docs to use"""
+    _run_cmd("cd %s/.. && make scalapkg" % app.builder.srcdir)
+    _run_cmd("cd %s/.. && make scalainstall" % app.builder.srcdir)
+
 def build_scala_docs(app):
     """build scala doc and then move the outdir"""
     scala_path = app.builder.srcdir + '/../scala-package'
     # scaldoc fails on some apis, so exit 0 to pass the check
-    _run_cmd('cd ..; make scalapkg')
     _run_cmd('cd ' + scala_path + '; scaladoc `find . -type f -name "*.scala" | egrep \"\/core|\/infer\" | egrep -v \"Suite\"`; exit 0')
     dest_path = app.builder.outdir + '/api/scala/docs'
     _run_cmd('rm -rf ' + dest_path)
@@ -115,8 +119,6 @@ def build_scala_docs(app):
 
 def build_clojure_docs(app):
     """build clojure doc and then move the outdir"""
-    _run_cmd("cd %s/.. && make scalapkg" % app.builder.srcdir)
-    _run_cmd("cd %s/.. && make scalainstall" % app.builder.srcdir)
     clojure_path = app.builder.srcdir + '/../contrib/clojure-package'
     _run_cmd('cd ' + clojure_path + '; lein codox')
     dest_path = app.builder.outdir + '/api/clojure/docs'
@@ -411,6 +413,9 @@ def setup(app):
     if _DOXYGEN_DOCS:
         print("Building Doxygen!")
         app.connect("builder-inited", generate_doxygen)
+    if _SCALA_DOCS or _CLOJURE_DOCS:
+        print("Building Scala!")
+        app.connect("builder-inited", build_scala)
     if _SCALA_DOCS:
         print("Building Scala Docs!")
         app.connect("builder-inited", build_scala_docs)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services