def main_Build(options, configs): checkBuildEnvironment(checkCython=True, checkPython="--noversioncheck" not in options and "--nocompile" not in options) checkBuildOptions(options) changedFileStates = build(configs, skipCompilation="--nocompile" in options) printChangedFileStates(changedFileStates, currentDirectory) if "--copy" in options: copyTarget = configs["Copy Target"] if not directoryExists(copyTarget): print("Copy Target not found. Please correct the conf.json file.") else: execute_CopyAddon(addonDirectory, configs["Copy Target"], addonName) print() if "--export" in options: execute_Export(addonDirectory, exportPath, addonName) if "--exportc" in options: execute_ExportC(addonDirectory, exportCPath, exportCSetupPath, addonName) if "--exportheaders" in options: execute_ExportHeaders(addonDirectory, exportHeadersPath, addonName)
import os import sys currentDirectory = os.path.dirname(os.path.abspath(__file__)) if not os.path.samefile(currentDirectory, os.getcwd()): print("You are not in the correct directory.") print("Expected:", currentDirectory) print("Got: ", os.getcwd()) sys.exit() if currentDirectory not in sys.path: sys.path.append(currentDirectory) addonName = "an_extra_nodes" addonDirectory = os.path.join(currentDirectory, addonName) exportPath = os.path.join(currentDirectory, "{}.zip".format(addonName)) from _setuputils.export import execute_Export from _setuputils.compilation import execute_Compile from _setuputils.compile_libraries import execute_CompileLibraries from _setuputils.setup_info_files import getSetupInfoList setupInfoList = getSetupInfoList(addonDirectory) execute_CompileLibraries(setupInfoList, addonDirectory) execute_Compile(setupInfoList, addonDirectory) execute_Export(addonDirectory, exportPath, addonName) print("\nDone.")