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 an installer from an application folder using NSIS 13 ---------------------------------------------------------------------------------------------- 18 - Requires PyCODAC in PYTHONPATH. 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__)))))
33 from PyXMake
import VTL
38 __pyc_src_path = PyCODAC.PyCODACPath
49 source=os.path.join(__pyc_src_path,
"Plugin",
"JupyterLab",
"src",
".dist",
"pycodac"),
51 output=os.path.join(__pyc_src_path,
"Plugin",
"JupyterLab",
"src",
".dist"),
53 scratch=VTL.Scratch, verbosity=2,
57 Main function to execute the script. 60 Bundle = pyx.NSIS(BuildID, files, scratch=scratch, verbose=verbosity)
62 Bundle.SourcePath(source)
64 Bundle.OutputPath(output)
66 Bundle.create(**kwargs)
68 if __name__ ==
"__main__":
72 parser = argparse.ArgumentParser(description=
"Create a portable installer using NSIS")
73 parser.add_argument(
"files", metavar=
"file.py", nargs=1, help=
"List of files injected into the installation executable ")
77 args, _ = parser.parse_known_args()
79 make_opt = args.make[0]
90 print(
"==================================")
91 print(
"Finished building bundled installer")
92 print(
"==================================")
def main(BuildID, files="*.*", source=os.path.join(__pyc_src_path,"Plugin","JupyterLab","src",".dist","pycodac"), output=os.path.join(__pyc_src_path,"Plugin","JupyterLab","src",".dist"), scratch=VTL.Scratch, verbosity=2, kwargs)
Module containing all relevant modules and scripts associated with the building process.