2021-01-15 07:30:09 +01:00
|
|
|
# This program requires doxygen, sphinx, breathe and exhale.
|
|
|
|
|
|
|
|
|
|
import os
|
2021-02-05 12:01:57 +00:00
|
|
|
import shutil
|
2021-01-15 07:30:09 +01:00
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
from sys import platform
|
|
|
|
|
|
|
|
|
|
conf_path = "./conf.py"
|
|
|
|
|
index_path = "./index.rst"
|
|
|
|
|
|
|
|
|
|
if not os.path.isdir("./output/doxygen/xml"):
|
|
|
|
|
os.makedirs("output/doxygen/xml")
|
|
|
|
|
|
2021-02-05 12:01:57 +00:00
|
|
|
subprocess.check_call(["sphinx-build", "-b", "html", ".", "output"])
|
2021-01-15 07:30:09 +01:00
|
|
|
|
|
|
|
|
if platform == "linux" or platform == "linux2":
|
2021-02-05 12:01:57 +00:00
|
|
|
if os.path.isdir("output/python"):
|
|
|
|
|
shutil.rmtree("output/python")
|
2021-01-15 07:30:09 +01:00
|
|
|
|
2021-02-05 12:01:57 +00:00
|
|
|
if not os.path.exists(os.path.join("../src/ifcblenderexport/docs", "contents.rst")):
|
|
|
|
|
subprocess.check_call(["ln", "index.rst", "contents.rst"], cwd="../src/ifcblenderexport/docs")
|
|
|
|
|
subprocess.check_call(["make", "html"], cwd="../src/ifcblenderexport/docs")
|
|
|
|
|
shutil.move("../src/ifcblenderexport/docs/_build", "./output")
|
|
|
|
|
os.rename("./output/_build", "./output/python")
|
2021-01-15 07:30:09 +01:00
|
|
|
|
|
|
|
|
elif platform == "win32" or platform == "win64":
|
2021-02-05 12:01:57 +00:00
|
|
|
subprocess.check_call(["make.bat", "html"])
|