convenience targets for make doc_py, doc_dna, doc_man

This commit is contained in:
Campbell Barton
2011-10-16 11:09:15 +00:00
parent 3fd8a914b8
commit 92bc72dca1
2 changed files with 18 additions and 3 deletions

View File

@@ -22,6 +22,7 @@
import subprocess
import os
import sys
import time
import datetime
@@ -43,10 +44,15 @@ def man_format(data):
return data
# allow passing blender as argument
if sys.argv[-1].endswith(os.sep + "blender"):
blender_bin = sys.argv[-1]
else:
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode()
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
blender_version = blender_version.split("Build")[0]