def CompileOneFileAsConsoleApp1(fileName, assemblyName, setMainFile): sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) if setMainFile: pc.MainFile = fileName pc.Compile()
def CompileOneFileAsConsoleApp1(fileName, assemblyName, setMainFile) : sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) if setMainFile: pc.MainFile = fileName pc.Compile()
def CompileTwoFilesAsConsoleApp(fileName1, fileName2, assemblyName, setMainFile): sources = List[str]() sources.Add(fileName1) sources.Add(fileName2) pc = PythonCompiler(sources, assemblyName) if (setMainFile): pc.MainFile = fileName1 pc.Compile()
def UsingReference(fileName, typeName, assemblyName): sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) pc.MainFile = fileName refAsms = List[str]() refAsms.Add(System.Type.GetType(typeName).Assembly.FullName) pc.ReferencedAssemblies = refAsms pc.Compile()
def CheckIncludeDebugInformation(fileName, assemblyName, include): sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) pc.IncludeDebugInformation = include pc.Compile()
def CompileOneFileAsConsoleApp2(fileName, assemblyName): sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) pc.MainFile = "NotExistFile" pc.Compile()
def CompileAsDll(fileName, assemblyName): sources = List[str]() sources.Add(fileName) pc = PythonCompiler(sources, assemblyName) pc.TargetKind = System.Reflection.Emit.PEFileKinds.Dll pc.Compile()