def AssignJson(uconfig): config = ndcDict(uconfig) if config['JSONPATH'] and os.path.isfile(config['JSONPATH']): with open(config['JSONPATH'], 'r') as assjr: config['ASSEMBLY'] = json.load(assjr) log.FILE('Confirmed: {}'.format(config['JSONPATH'])) elif config['JSONPATH']: with open(defaultjson, 'r') as jassr: assembly = json.load(jassr) log.FILE('Confirmed: {}'.format(defaultjson)) with open(config['JSONPATH'], 'w') as jassw: json.dump(assembly, jassw, indent=4) log.FILE('{}'.format(config['JSONPATH'])) log.info('\n*Use auto-named json on next build:\n "{}"' \ .format(config['JSONPATH'])) log.info(('\nUsing defualt assembly:\n\t {}\n\tSaved as:\n\t {}') \ .format(defaultjson, config['JSONPATH'])) with open(config['JSONPATH'], 'r') as jassr: config['ASSEMBLY'] = ndcDict(json.load(jassr)) log.FILE('Confirmed: {}'.format(config['JSONPATH'])) log.warn(('\nNo user filepath param - using :\n\t {}') \ .format(defaultjson)) else: raise FatalError('SynTaxError', 'Try using fully qualified filepaths') return ndcDict(config)
def AssignListFiles(uconfig, args_): args = ndcDict(args_) config = ndcDict(uconfig) if args['listexe']: config['LISTFILES']['exe'] = [] config['LISTFILES']['exe'] = loadRes(args['listexe']) if args['listdll']: config['LISTFILES']['dll'] = [] config['LISTFILES']['dll'] = loadRes(args['listdll']) for key in config['LISTFILES'].keys(): if isinstance(config['LISTFILES'][key], list): for vfile in config['LISTFILES'][key]: if vfile and 'assembly.json' in vfile: vfile = config['JSONPATH'] elif config['LISTFILES'][key] and \ 'assembly.json' in config['LISTFILES'][key]: log.fatal("\nWrong keys in list files: check params") config['LISTFILES'][key] = config['JSONPATH'] return ndcDict(config)
def LoadConfig(parsedArgs): ''' Load user defined "configPath" or start with auto-renamed default configuration as helper, if started with "two quotes" no space ("") as configPath parameter. After user adjustments to default_config.config content or name, or path, user will need to re-run using "auto-renamed" config path. The auto-renamed file is *shown as output* in the output log. This will finish a build. Provides user opportunity to change defaults in an editor before building on default settings and assembly information. If you use "two quotes no space ("") as the first arg then the default config path is used and build proceeds with an auto re-named appname:_config.config file or if no main name was provided the default_config.config file which user can modify. If the output path ("ourDir" arg) is not resolved generated files go to the "/UserDefaulted" directory. :param: parsredArgs from ParseArg [OrderedDict] :return: userconfig [config Dict] - written to file path shown in writefiles.log :raises: FatalError or partialError [Exception] or [error sink list] *user can re-run ipybuild on a partialError fix* ''' parsedArgs = ndcDict(parsedArgs) config = None userconfig = None #load default "bank" config with open(defaultcfg, 'r') as jcr: config = json.load(jcr) log.FILE('Confirmed: {}'.format(defaultcfg)) #assign paths config = AssignPaths(parsedArgs['configPath'], parsedArgs['mainName'], parsedArgs['json'], parsedArgs['outDir'], config) config['CONFIGPATH'] = os.path.abspath(config['CONFIGPATH']) with open(config['CONFIGPATH'], 'w') as jcw: json.dump(config, jcw, indent=4) userconfig = ndcDict(config) log.FILE('{}'.format(userconfig['CONFIGPATH'])) # assign input args uconfig = AssignArgsConfig(parsedArgs, userconfig) # check input args CheckConfig(uconfig) return ndcDict(uconfig)
def AssignPaths(con, main, js, arg_out, uconfig): PTYPESK = [('json', 'JSONPATH'), ('name', 'MAINFILE'), ('config', 'CONFIGPATH'), ('mkdir', 'MAKEDIR'), ('odir', 'OUTDIR')] uconfig = ndcDict(uconfig) # need space to parse not None if not con or con == '' or con == "": con = ' ' for tk in PTYPESK: atyp, k = tk uconfig[k] = setPath(con, main, js, arg_out, f_type=atyp) return ndcDict(uconfig)
def AssignArgsConfig(args, uconfig): config = ndcDict(uconfig) if config['CONFIGPATH'] and os.path.isfile(config['CONFIGPATH']): log.FILE('Confirmed: {}'.format(config['CONFIGPATH'])) if config['MAINFILE']and os.path.isfile(config['MAINFILE']): log.FILE('Confirmed: {}'.format(config['MAINFILE'])) if args['makeEXE']: config['MAKEEXE'] = args['makeEXE'] config = AssignJson(config) config = AssignListFiles(config, args) config = AssignMakeZip(config, args) return ndcDict(config)
def checkBuildConfig(usrconfig, show=False): ''' Re-check to final config file ''' userconfig = ndcDict(usrconfig) if not all(k in userconfig.keys() for k in defaultconfig.keys()): log.error('\n keys {}\n\t{}' \ .format(str(userconfig.keys()), \ str(defaultconfig.keys()))) raise KeyError('user param config key mismatched with default') if show: showUserConfig(userconfig) with open(userconfig['CONFIGPATH'], 'w') as jw: json.dump(userconfig, jw, indent=4) log.FILE('{}'.format(userconfig['CONFIGPATH'])) ext = '.dll' if userconfig['MAKEEXE'] == True or \ str(userconfig['MAKEEXE']).upper() == 'TRUE': ext = '.exe' outfile = genOutFilePath(userconfig['MAKEEXE'], userconfig['MAINFILE'], userconfig['OUTDIR']) if gsBuild.Verbose or not gsBuild.INFO: log.info('\nOK - Reading Configuration file:\n {}' \ .format(userconfig['CONFIGPATH'])) log.info('\nOK - Building file {}\nOK - output typ : {}\n ' \ .format(outfile, ext[1:].upper())) reqlst = None if 'Tests' in os.getcwd(): log.warn('\n Tests in cwd {}'.format(os.getcwd())) reqlst = filecontrol.checkRequired('../unittest.txt') reqlst = filecontrol.checkRequired('requirements.txt') if PartialErrors: log.info('\nERR - Partial Error - check output for partial errors') elif not reqlst: if gsBuild.Verbose or not gsBuild.INFO: log.info('\nOK - requirements found:\n') elif reqlst: log.warn(('\nSome How Fail - requirements NOT found:\n' + \ ' *missing {}\n'*len(reqlst)).format(*reqlst)) if 'Tests' not in os.getcwd(): StartBuild(userconfig['CONFIGPATH']) return True
def _parseDics(dickey, val, argtypes): ''' Handle dict parsing - [str] or [list] - into argtyps <type> ''' atyps = ndcDict(argtypes) curdic = atyps['d'][dickey] if isinstance(curdic, list): atyps['d'][dickey].append(val) elif not curdic: atyps['d'][dickey] = val else: curval = curdic atyps['d'][dickey] = [] atyps['d'][dickey].extend([curval, val]) return ndcDict(atyps)
def ParseArgs(*sargs): ''' Parse cmd or script args with ability to parse/accept multiple user type entries. :return: user args [ordered dict] ''' argtypes = _parseStd(sargs) mainargs = OrderedDict(maindict) mkeys = mainargs.keys() for ky, vl in argtypes.iteritems(): if ky == 's': for i, p in enumerate(vl): mainargs[mkeys[i]] = p if ky == 'd': mainargs.update(argtypes[ky]) return ndcDict(mainargs)
def _parseStd(*args): ''' Separate str args, from tuple,lists,and kwargs :return: [dict] with keys ['s'] - single and ['d'] - multiple k,v ''' sargs = args[0] #unpack argtyps = { 's': [], 'd': { 'listexe': None, 'listdll': None, 'listzip': None, 'makeEXE': False } } lists = ['listexe', 'listdll', 'listzip', 'makeEXE'] argtyps, lists = _parseTup(sargs, argtyps, lists) return ndcDict(argtyps)
def _parseOrder(argtyps): ''' Order args by type of content (literal). *i.e.* **".py"** *in arg --> place in mainName as python file.* :return: agrtyps [ordered dict] ''' argtyps = ndcDict(argtyps) # filter config, name, json assembly if argtyps['s']: argslst = list(argtyps['s']) argtmp = [None, None, None, None] for ar in argslst: if ar: if '.config' in ar: argtmp[0] = ar elif '.py' in ar: argtmp[1] = ar elif (ar.startswith('/') or ar.startswith('\\') and \ not '.' in ar) or (ar.endswith('/') or ar.endswith('\\')): argtmp[2] = ar elif '.json' in ar: argtmp[3] = ar if not argtmp[0]: argtmp[0] = ' ' alst = list(argslst) tmplst = [] for i, s in enumerate(alst): if s and s not in argtmp: tmplst.append(s) tmplst = list(tmplst[::-1]) for j, a in enumerate(argtmp): if not a and tmplst: argtmp[j] = tmplst.pop() argtyps['s'] = None argtyps['s'] = argtmp return argtyps
def CheckConfig(uconfig): ''' Check for valid config entries after parse/loading :param: config Dict from LoadConfig [OrderedDict] :return: userconfig [config Dict] - as written to file path shown in writefiles.log :raise: FatalError or partialError [Exception] or [error sink list] *user can re-run ipybuild on a partialError fix* *why FatalError - a user messed with defaults - error vs program error* ''' userfig = ndcDict(uconfig) if not len([val for val in userfig if val or val != '']) >= 1: raise ValueError('need at least one parameter for config') if not userfig['MAKEDIR'] or not opex(opd(userfig['MAKEDIR'])): raise NameError('bad path to config file {}' \ .format(opd(userfig['MAKEDIR']))) if not all(k in userfig.keys() for k in defaultconfig.keys()): log.error('\n keys {}\n\t{}'.format(str(userfig.keys()), \ str(defaultconfig.keys()))) raise FatalError('KeyError', 'bad userconfig key set') if not userfig['MAINFILE'] or userfig['MAINFILE'] == '': raise FatalError('NameError', 'need main name.py') if not '.py' in userfig['MAINFILE'] or not opex(userfig['MAINFILE']): try: raise NameError except NameError as ex: msg = ' main name "{}" must be .py file and exist' \ .format(userfig['MAINFILE']) partialError(ex, msg) if not isinstance(userfig['MAKEEXE'], bool) and \ str(userfig['MAKEEXE']).upper() not in ['TRUE', 'FALSE']: try: raise ValueError except ValueError as ex: msg = 'makeEXE {}: need type bool in params (no key needed)' \ .format(userfig['MAKEEXE']) partialError(ex, msg) if not opex(userfig['JSONPATH']): try: raise NameError except NameError as ex: msg = 'bad path to assembly.json file "{}"' \ .format(userfig['JSONPATH']) partialError(ex, msg) if not opex(userfig['CONFIGPATH']): try: raise NameError except NameError as ex: msg = 'bad path to assembly.json file "{}"' \ .format(userfig['CONFIGPATH']) partialError(ex, msg)
def AssignMakeZip(uconfig, args): config = ndcDict(uconfig) outzipPath = None cfz = config['ZIPPATH'] if args['listzip']: zfiles = [] # missing zipfiles in listzip.txt or input zips = loadRes(getTrueFilePath(args['listzip'])) zpl = None uzips = None # unique zips if zips: zpl = len(zips) # zip exists with cur name if have zipped before isautozip = False try: import zlib mode = zipfile.ZIP_DEFLATED except ImportError: mode = zipfile.ZIP_STORED config['LISTFILES']['zip'] = [] if isinstance(zips, list): config['LISTFILES']['zip'].extend(zips) else: config['LISTFILES']['zip'].append(zips) # set outzip path manf = 'default.zip' if config['MAINFILE']: manf = ('.').join(opb(config['MAINFILE']).split('.')[:-1]) + '.zip' outzipPath = opj(config['OUTDIR'], manf) # stop trying to overwrite same file # current zip path cfzp = None if cfz: try: cfzp = getTrueFilePath(cfz) if opex(cfzp): isautozip = True except IOError: pass # auto zip path elif outzipPath: try: cfzp = getTrueFilePath(outzipPath) if opex(cfzp): isautozip = True except IOError: pass # update zip path config['ZIPPATH'] = cfzp cfz = cfzp # -- zipping --- # uzips if isautozip: infoExistZip(cfz, outzipPath) log.FILE('Confirmed: {}'.format(cfzp)) zipsRelative = [] for zipname in zips: relname = None relname = _getRelativeZipName(zipname) if relname: zipsRelative.append(relname) else: zipsRelative.append(zipname) with zipfile.ZipFile(cfzp, 'a', mode) as ziprd: uzips = list(uniqueZips(zipsRelative, list(ziprd.namelist()))) for zfile in uzips: if not os.path.isfile(zfile): zfiles.append(zfile) continue arcname = _getRelativeZipName(zfile) if not arcname: arcname = oprel(zfile) ziprd.write(zfile, arcname) ziprd.close() # changed if uzips if uzips: if gsBuild.Verbose or not gsBuild.INFO: log.info(('\nSome Files already zipped in:\n{}\n\t' + \ '- delete to replace existing' + \ '\nadding zip files to existing archive:\n' + \ '{}\n'*len(uzips)) \ .format(cfz, *uzips)) # Need new zip with ZIPPATH/outzipPath as name elif not isautozip: warnZip(outzipPath) if isinstance(zips, list): with zipfile.ZipFile(cfz, 'a', mode) as zipr: for zfile in list(set(zips)): if not os.path.isfile(zfile): zfiles.append(zfile) continue arcname = _getRelativeZipName(zfile) if not arcname: arcname = oprel(zfile) zipr.write(zfile, arcname) log.FILE('{}'.format(config['ZIPPATH'])) zipr.close() if isinstance(zips, (str, unicode)): with zipfile.ZipFile(cfz, 'w', mode) as zipr: arcname = oprel(zips) zipr.write(zips, arcname) zipr.close() log.FILE('{}'.format(cfz)) if zfiles: log.warn(('\nFile | path does not exist - ' +\ 'skipped adding zip files:\n\t' + \ '{} \n\t'*len(zfiles)).format(*zfiles)) log.FILE(('*Missing zip: {}\n'*len(zfiles)).format(*zfiles)) partialError('ValueError', ('*Missing zip: {}\n'*len(zfiles)).format(*zfiles)) return ndcDict(config)
def _parseTup(tup, argtyps, lists, f_list=False): ''' Handle tuple arg parsing into argtyps <type> ''' tags = ['exe', 'dll', 'zip'] trylst = None f_brokenlst = False for arg in tup: if arg and '[' in arg and ']' not in arg and not f_brokenlst: trylst = arg log.info('\nlist paramater {} was not quoted.'.format(arg)) f_brokenlst = True continue elif trylst and ']' in arg and '[' in trylst and f_brokenlst: arg = trylst + arg log.info('\npatched paramater now: {}'.format(arg)) elif trylst: log.error('need to quote lists, tuples, dicts in input parameters') try: arg = ast.literal_eval(arg) except Exception: pass tagmatch = None key = None dkey = None keys = None dkeys = None if arg: #Only get here on "True" - Must handle bool first or error if isinstance(arg, bool): argtyps['d']['makeEXE'] = arg lists.remove('makeEXE') continue keys = [k for k in lists if k in arg] ms = [m for m in tags if m in arg] if keys and len(keys) > 1 or (ms and len(ms) > 1): ambigWarn(arg) if keys: key = keys[0] tagmatches = [m for m in tags if m in arg] if tagmatches: tagmatch = tagmatches[0] dkeys = [dk for dk in lists if tagmatch in dk] if dkeys: dkey = dkeys[0] if isinstance(arg, (str, unicode)) and '=' not in arg: #put in first match if key: argtyps['d'][key] = arg continue elif not key and not tagmatch and not f_list: argtyps['s'].append(arg) continue elif not key and not tagmatch and f_list: argtyps = _parseDics('listexe', arg, argtyps) continue elif tagmatch: argtyps = _parseDics(dkey, arg, argtyps) continue else: ambigWarn(arg) raise FatalError('ValueError', 'Error: Ambiguous param: ' + \ str(arg)) elif isinstance(arg, (str, unicode)) and '=' in arg: if (key and key in arg.split('=')[0]) or dkey: if not key and dkey: key = dkey argtyps = _parseDics(key, arg.split('=')[1], argtyps) else: ambigWarn(arg) raise FatalError('ValueError', 'Error: Ambiguous param: ' + \ str(arg)) elif isinstance(arg, dict): for k, v in arg.iteritems(): argtyps = _parseDics(k, v, argtyps) elif arg and isinstance(arg, list) or \ isinstance(arg, tuple): argtyps, lists = _parseTup(arg, argtyps, lists, True) argtyps = ndcDict(_parseOrder(argtyps)) return argtyps, lists
def setUpClass(cls): print('-' * 59) log.info('\n defaultcfg {} '.format(defaultcfg)) cls.defaultcfg = os.path.normpath(defaultcfg.replace('\\Tests', '')) log.info('\n cls.defaultcfg {} '.format(cls.defaultcfg)) cls.maindict = OrderedDict(maindict) cls.parErr = PartialErrors assert cls.maindict == maindict, 'different dicts' cls.argslst = [('mock/locate_listexe.txt'), ('mock/locate_listexe.txt', 'mock/locate_listdll.txt'), ('mock/locate_listexe.txt', None, 'mock\\inst\\zip\\ziplist.txt')] cls.kwargslst = { 'listexe': 'mock/locate_list.txt', 'listzip': 'mock\\zip_locate.txt', 'json': 'Tests\\assembly.json' } # result Main args cls.mainArg = OrderedDict([('configPath', ' '), ('mainName', 'mock\\appname.py'), ('outDir', '.\\release'), ('makeEXE', False)]) # result Cmd args cls.argDict = OrderedDict([('configPath', ' '), ('mainName', 'mock\\appname.py'), ('outDir', '.\\release'), ('json', None), ('makeEXE', False), ('listexe', None), ('listdll', None), ('listzip', None)]) cls.argDict1 = ndcDict(cls.argDict) cls.argDict1['listexe'] = 'mock/locate_listexe.txt' cls.argDict2 = ndcDict(cls.argDict1) cls.argDict2['listdll'] = 'mock/locate_listdll.txt' #Adding cls.argDict3 = ndcDict(cls.argDict1) cls.argDict3['listzip'] = 'mock\zip_locate.txt' #Changing cls.argDict3['json'] = 'Tests\assembly.json' cls.argDict4 = OrderedDict([('configPath', ' '), ('mainName', 'mock\make.py'), ('outDir', None), ('json', None), ('makeEXE', False), ('listexe', None), ('listdll', None), ('listzip', None)]) #log.debug('\n *argDict chk typ {} dict{}'.format(type(cls.argDict), \ # str(cls.argDict))) cls.argDicts = [ cls.argDict, cls.argDict1, cls.argDict2, cls.argDict3, cls.argDict4 ] #cmdline args cls.sysargv_lst = [([__name__, None, 'mock\\appname.py', '.\\release'], cls.argDicts[0]), ([ __name__, None, 'mock\\appname.py', '.\\release', None, cls.argslst[0] ], cls.argDicts[1]), ([ __name__, None, 'mock\\appname.py', '.\\release', None, cls.argslst[1] ], cls.argDicts[2]), ([ __name__, None, 'mock\\appname.py', '.\\release', None, cls.kwargslst ], cls.argDicts[3]), ([__name__, None, 'mock\\make.py'], cls.argDicts[4])] for par in cls.sysargv_lst: #log.debug('\n par[1] type{}'.format(type(par[1]))) assert isinstance(par[1], OrderedDict), \ 'Error in unittest cls setUp' assert cls.maindict.keys() == par[1].keys(), \ 'cls ordereddict not eqaual' print("\n\t" + cls.__name__ + " set-up") print('-' * 59)
def _setCompilerClass(rconfig): config = ndcDict(rconfig) f_standalone = None f_embed = None f_libembed = None f_parerr = None # f_parerr - Stop build on partialError that is Fatal to Compile # Let makeBuild finish so that user can fix partialErrs with open(config['CONFIGPATH'], 'r') as jbcr: config = ndcDict(json.load(jbcr)) if gsBuild.Verbose or not gsBuild.INFO: log.info('\n Building from CONFIG:\n {}\n'.format( json.dumps(config, indent=4))) if not opex(config['MAINFILE']): try: raise IOError except IOError as ex: msg = 'File Filepath does Not exist:\n "{}"' \ .format(config['MAINFILE']) partialError(ex, msg) f_parerr = True if not f_parerr: log.FILE('Build Loaded: {}'.format(config['MAINFILE'])) assemInfo = config['ASSEMBLY'] if isinstance(assemInfo['standalone'], bool) or \ str(assemInfo['standalone']).upper() in ['TRUE', 'FALSE']: f_standalone = True if str(assemInfo['standalone']).upper() == \ 'TRUE' else False if isinstance(assemInfo['embed'], bool) or \ str(assemInfo['embed']).upper() in ['TRUE', 'FALSE']: f_embed = True if str(assemInfo['embed']).upper() == 'TRUE' else False if isinstance(assemInfo['libembed'], bool) or \ str(assemInfo['libembed']).upper() in ['TRUE', 'FALSE']: f_libembed = True if str(assemInfo['libembed']).upper() \ == 'TRUE' else False ext = '.dll' if config['MAKEEXE'] == True or \ str(config['MAKEEXE']).upper() == 'TRUE': ext = '.exe' if f_standalone and not config['MAKEEXE']: log.warn('\n** Switching to exe /stanalone == true in Assembly:' + \ '\n {}\n Overrides default or makeEXE input arg == False' \ .format(config['JSONPATH'])) MAINOUT = opn(opj(config['OUTDIR'], ('.').join(opb(config['MAINFILE']) \ .split('.')[:-1])) + ext) IPATH = gsBuild.IPATH STDLIBSOURCE = opabs(opj(IPATH, 'StdLib.dll')) LIBPATH = opabs(opj(IPATH, 'Lib')) compiler.pycpath = (opn(opd(opabs(gsBuild.IPYBLDPATH)))) + '\pyc.py' compiler.stdlibsource = STDLIBSOURCE compiler.ipath = IPATH compiler.libpath = LIBPATH if not op.isfile(STDLIBSOURCE): _createStdLib() MAINOUTDIR = ('.').join(MAINOUT.split('.')[:-1]) PYCDIR = opn(opj(os.getcwd(), opb(MAINOUTDIR)) + ext) STDLIBRELEASE = opj(opd(MAINOUTDIR), 'StdLib.dll') MAINFILE = config['MAINFILE'] isLib = opex(LIBPATH) isStdLib = op.isfile(STDLIBSOURCE) haveStdLib = op.isfile(opj(os.getcwd(), 'StdLib.dll')) isReleasedStdLib = op.isfile(STDLIBRELEASE) lstdll = [] if config['LISTFILES']['dll']: if isinstance(config['LISTFILES']['dll'], list): for lfile in config['LISTFILES']['dll']: if lfile and '__init__' not in lfile: lstdll.append(lfile) else: lstdll.append(config['LISTFILES']['dll']) lstexe = [] if config['LISTFILES']['exe']: if isinstance(config['LISTFILES']['exe'], list): for xfile in config['LISTFILES']['exe']: if xfile and '__init__' not in xfile: lstexe.append(xfile) else: lstexe.append(config['LISTFILES']['exe']) lstexe = nullList(lstexe) compiler.f_standalone = f_standalone compiler.f_embed = f_embed compiler.f_libembed = f_libembed compiler.f_parerr = f_parerr compiler.mainout = MAINOUT compiler.ipath = IPATH compiler.mainoutdir = MAINOUTDIR compiler.pycdir = PYCDIR compiler.stdlibrelease = STDLIBRELEASE compiler.stdlibsource = STDLIBSOURCE compiler.libpath = LIBPATH compiler.mainfile = MAINFILE compiler.isLib = isLib compiler.isStdLib = isStdLib compiler.haveStdLib = haveStdLib compiler.isReleasedStdLib = isReleasedStdLib compiler.lstdll = lstdll compiler.lstexe = lstexe compiler.ext = ext compiler.lstexedlls = None if not opex(opd(compiler.pycdir)): raise IOError('FilePath {}:\t Use absolute or relative to:\n\t {}' \ .format(opd(compiler.pycdir), os.getcwd())) if compiler.f_standalone: if gsBuild.Verbose or not gsBuild.INFO: log.info('\nNew {} compile standalone from:\n {}' \ .format(ext.upper().replace('.', ''), config['MAINFILE'])) else: mfn = 'application/lib' if config['MAINFILE']: mfn = opb(config['MAINFILE']) if gsBuild.Verbose or not gsBuild.INFO: log.info(("\nNew {} compile from: \n {}" + \ "\n\tAs Required: add your {}, project, and ironpython"+ \ "\n\tdll(s) to path:\n\t{}\n\n") .format(ext.upper().replace('.', ''), config['MAINFILE'], mfn, config['OUTDIR'])) if gsBuild.Verbose or not gsBuild.INFO: log.info('\n Lib source path {}'.format(LIBPATH)) log.info('\n "IF" set "True", f_libembed adds ~23mb to file:' + \ 'now set as {}'.format(compiler.f_libembed)) if compiler.f_libembed and compiler.isStdLib: if gsBuild.Verbose or not gsBuild.INFO: if compiler.isReleasedStdLib: log.info('\nOK - "StdLib.dll" exists delete'+ \ ' or move to update:\n{}'.format(STDLIBRELEASE)) else: log.info('\nOK - "StdLib.dll" exists delete'+ \ ' or move to update:\n{}'.format(STDLIBSOURCE)) elif not compiler.isStdLib and compiler.f_libembed and \ not compiler.isReleasedStdLib and compiler.isLib: _createStdLib() if not compiler.isStdLib: raise NotImplementedError('StdLib: Need ironpython2.7 distribution' + \ ' in something like ../ironpython path')