Merge branch 'master' into 2221-complete-docker
[arvados.git] / doc / Rakefile
index 2ebd27228f4337aec9d4eb9890693bb993557412..a10d54cdee319411f83419fac5e731cb3eb26aec 100644 (file)
@@ -1,18 +1,25 @@
 #!/usr/bin/env rake
 
 require "rubygems"
-Rake.application.rake_require "zenweb/tasks"
+require "colorize"
+
+require "zenweb/tasks"
 load "zenweb-textile.rb"
 load "zenweb-liquid.rb"
 
-file ".site/sdk/python/arvados/index.html" do |t|
-  sh "epydoc --html -o sdk/python/arvados arvados"
-  Dir["sdk/python/arvados/*"].each do |f|
-    puts f
-    $website.pages[f] = Zenweb::Page.new($website, f)
+file "sdk/python/arvados/index.html" do |t|
+  `which epydoc`
+  if $? == 0
+    `epydoc --html -o sdk/python/arvados arvados`
+    Dir["sdk/python/arvados/*"].each do |f|
+      puts f
+      $website.pages[f] = Zenweb::Page.new($website, f)
+    end
+  else
+    puts "Warning: epydoc not found, Python documentation will not be generated".colorize(:light_red)
   end
 end
 
 task :extra_wirings do
-  $website.pages["sdk/python/python.html.textile.liquid"].depends_on(".site/sdk/python/arvados/index.html")
+  $website.pages["sdk/python/python.html.textile.liquid"].depends_on("sdk/python/arvados/index.html")
 end