18799: Build Python SDK before generating web documentation
authorBrett Smith <brett.smith@curii.com>
Thu, 13 Apr 2023 14:07:05 +0000 (10:07 -0400)
committerBrett Smith <brett.smith@curii.com>
Thu, 13 Apr 2023 14:07:05 +0000 (10:07 -0400)
This gives preprocessing steps like discovery2pydoc a chance to run.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

doc/Rakefile

index 1390aa0e9c0ca7dd9f3bf14772c037686db8ff3f..676f2845c5bb073d9ef3662a5571011f320e19d5 100644 (file)
@@ -56,8 +56,10 @@ file "sdk/python/arvados/index.html" do |t|
   end
   `which pdoc`
   if $? == 0
-    STDERR.puts `pdoc --html -o sdk/python ../sdk/python/arvados/ 2>&1`
-    raise if $? != 0
+    raise unless system("python3", "setup.py", "build",
+                        chdir: "../sdk/python", out: :err)
+    raise unless system("pdoc", "--html", "-o", "sdk/python", "../sdk/python/build/lib/arvados/",
+                        out: :err)
   else
     puts "Warning: pdoc3 not found, Python documentation will not be generated".colorize(:light_red)
   end