6 Triple-use minimum working example for PyXMake. This script can be 7 executed in three different ways in varying levels of accessibility 9 @note: Create documentations for PyXMake, PyCODAC and STMLab with Sphinx. 13 ---------------------------------------------------------------------------------------------- 20 @author: garb_ma [DLR-FA,STM Braunschweig] 21 ---------------------------------------------------------------------------------------------- 30 sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
34 from PyXMake
import VTL
37 __arch = Utility.GetArchitecture()
38 __platform = Utility.GetPlatform()
42 from PyCODAC.Tools.Utility
import GetPyCODACPath
44 __pyc_core_path = GetPyCODACPath()
51 ErrorHandling.InputError(20)
57 source = os.path.join(__pyc_core_path,
"VTL",
"doc",
"mcd_stmlab",
"source") ,
58 output= os.path.join(__pyc_core_path,
"VTL",
"doc",
"mcd_stmlab"),
59 include=[os.path.join(__pyc_core_path,
"Plugin",
"Smetana"),
60 os.path.join(__pyc_core_path,
"Plugin",
"Smetana",
"src",
"Smetana"),
61 os.path.join(__pyc_core_path,
"Core",
"bin",__platform,__arch)],
62 scratch=VTL.Scratch, verbosity=2,
65 Main function to execute the script. 68 SphinxBuild = pyx.Sphinx(BuildID, masterfile, scratch=scratch, verbose=verbosity)
69 SphinxBuild .SourcePath(source)
70 SphinxBuild .AddIncludePath(include)
71 SphinxBuild.OutputPath(output)
72 SphinxBuild.Settings(**kwargs)
75 if __name__ ==
'__main__':
79 parser = argparse.ArgumentParser(description=
"Build shared Fortran libraries for Python remotely on the institute cluster.")
80 parser.add_argument(
"user", metavar=
"user", nargs=1, help=
"Current user for SSH connection")
84 args, _ = parser.parse_known_args()
93 main(
"Structural Mechanics Lab",
"stm_lab", logo=os.path.join(__pyc_core_path,
"VTL",
"doc",
"mcd_stmlab",
"pics",
"stm_lab_logo_bubbles.png"))
96 raise NotImplementedError
99 print(
"==================================")
100 print(
"Finished build with Sphinx")
101 print(
"==================================")
Module containing all relevant modules and scripts associated with the building process.
def main(BuildID, masterfile, source=os.path.join(__pyc_core_path,"VTL","doc","mcd_stmlab","source"), output=os.path.join(__pyc_core_path,"VTL","doc","mcd_stmlab"), include=[os.path.join(__pyc_core_path,"Plugin","Smetana"), os, path, join, __pyc_core_path, Plugin, Smetana, src, Smetana, os, path, join, __pyc_core_path, Core, bin, __platform, __arch, scratch=VTL.Scratch, verbosity=2, kwargs)