+ raise unless system("python3", "setup.py", "build",
+ chdir: "../sdk/python", out: :err)
+ raise unless system("python3", "pysdk_pdoc.py",
+ out: :err)
+ else
+ puts "Warning: pdoc not found, Python documentation will not be generated".colorize(:light_red)
+ end
+end
+
+file "sdk/R/arvados/index.html" do |t|
+ if ENV['NO_SDK'] || File.exist?("no-sdk")
+ next
+ end
+ `which R`
+ if $? == 0
+ tgt = Dir.pwd
+ Dir.mkdir("sdk/R")
+ Dir.mkdir("sdk/R/arvados")
+ puts("tgt", tgt)
+ cp('css/R.css', 'sdk/R/arvados')
+ docfiles = []
+ Dir.chdir("../sdk/R/") do
+ Dir.entries("man").each do |rd|
+ if rd[-3..-1] == ".Rd"
+ htmlfile = "#{rd[0..-4]}.html"
+ `R CMD Rdconv -t html man/#{rd} > #{tgt}/sdk/R/arvados/#{htmlfile}`
+ docfiles << htmlfile
+ end
+ end
+ end