def main(args): global parser config = defs # Parse command line arguments initParser() options = parser.parse_args(args) if (options.list_compilers): listCompilers() sys.exit(0) if options.compiler: compiler = options.compiler if options.platform: platFile = options.platform # Add command line arg to select ipv4 vs. ipv6 socket family if (options.ipv6): defs.pop("SOCKET_FAMILY_INET", None) # Remove ipv4 defn defs["SOCKET_FAMILY_INET6"] = None print(" Building Sedona VM to use IPv6 protocol.\n") else: # Defaults to IPv4 defs.pop("SOCKET_FAMILY_INET6", None) # Remove ipv6 defn defs["SOCKET_FAMILY_INET"] = None print(" Building Sedona VM to use IPv4 protocol.\n") # Add cmd line arg to set version string if options.ver: defs["PLAT_BUILD_VERSION"] = '\\"' + options.ver + '\\"' verifyOpts() # Compile Sedona VM compile(config) # Create platform archive and install in platform DB platArchive.main(["--db", "--stage", os.path.join(stageDir, ".par")])
def main(argv): global compiler, platFile, stageDir try: opts, args = getopt.getopt(argv, "c:hlp:", ["compiler=", "platform="]) for opt, arg in opts: if opt in ("-l"): listCompilers() sys.exit() elif opt in ("-h", "--help"): usage() sys.exit() elif opt in ("-c", "--compiler"): compiler = arg elif opt in ("-p", "--platform"): platFile = arg verifyOpts() compile() platArchive.main(["--db", "--stage", os.path.join(stageDir, ".par")]) except getopt.GetoptError: usage() sys.exit(1)
if __name__ == '__main__': global parser config = defs # Parse command line arguments initParser() options = parser.parse_args() # Add command line arg to select ipv4 vs. ipv6 socket family if (options.ipv6): defs.pop("SOCKET_FAMILY_INET", None) # Remove ipv4 defn defs["SOCKET_FAMILY_INET6"] = None print " Building Sedona VM to use IPv6 protocol.\n" else: # Defaults to IPv4 defs.pop("SOCKET_FAMILY_INET6", None) # Remove ipv6 defn defs["SOCKET_FAMILY_INET"] = None print " Building Sedona VM to use IPv4 protocol.\n" # Add cmd line arg to set version string if options.ver: defs["PLAT_BUILD_VERSION"] = '\\"' + options.ver + '\\"' # Compile Sedona VM compile(config) # Create platform archive and install in platform DB platArchive.main(["--db", "--stage", os.path.join(stageDir, ".par")])