bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,800 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,801 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,802 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,803 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,804 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,805 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,806 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,807 |
def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | def __init__(self, *args, **kws): Target.__init__(self) self.console = kws.get('console',1) self.debug = kws.get('debug',0) self.name = kws.get('name',None) self.icon = kws.get('icon',None) self.versrsrc = kws.get('version',None) self.manifest = kws.get('manifest',None) self.resources = kws.get('resources',[]) self.str... | 448,808 |
def _bootloader_file(self, exe): base = "support/loader" | def _bootloader_file(self, exe): base = "support/loader" | 448,809 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin': return fnm if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Load cache index cachedir = os.path.join(HOMEPATH, 'bincache%d... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Load cache index cachedir = os.pat... | 448,810 |
def selectAssemblies(pth): """Return a binary's dependent assemblies files that should be included. Return a list of pairs (name, fullpath) """ rv = [] if not os.path.isfile(pth): pth = check_extract_from_egg(pth)[0][0] for assembly in getAssemblies(pth): if excludesRe.search(assembly.name): if not silent: print "I: S... | def selectAssemblies(pth): """Return a binary's dependent assemblies files that should be included. Return a list of pairs (name, fullpath) """ rv = [] if not os.path.isfile(pth): pth = check_extract_from_egg(pth)[0][0] for assembly in getAssemblies(pth): if excludesRe.search(assembly.name): if not silent: print "I: S... | 448,811 |
def importHook(self, name, globals=None, locals=None, fromlist=None, level=-1): __globals_name = None if globals: __globals_name = globals.get('__name__') # first see if we could be importing a relative name debug("importHook(%s, %s, locals, %s, %s)" % (name, __globals_name, fromlist, level)) _sys_modules_get = sys.mod... | def importHook(self, name, globals=None, locals=None, fromlist=None, level=-1): __globals_name = None if globals: __globals_name = globals.get('__name__') # first see if we could be importing a relative name debug("importHook(%s, %s, locals, %s, %s)" % (name, __globals_name, fromlist, level)) _sys_modules_get = sys.mod... | 448,812 |
def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch) while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' else: cmd, arg = toks cm... | def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch, debug, name + '.log') while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' el... | 448,813 |
def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch) while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' else: cmd, arg = toks cm... | def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch) while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' else: cmd, arg = toks cm... | 448,814 |
def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch) while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' else: cmd, arg = toks cm... | def main(): global stack name = sys.argv[1] arch = getArchive(name) stack.append((name, arch)) show(name, arch) while 1: try: toks = string.split(raw_input('? '), None, 1) except EOFError: # Ctrl-D print # clear line break if not toks: usage() continue if len(toks) == 1: cmd = toks[0] arg = '' else: cmd, arg = toks cm... | 448,815 |
def show(nm, arch): if type(arch.toc) == type({}): print " Name: (ispkg, pos, len)" toc = arch.toc else: print " pos, length, uncompressed, iscompressed, type, name" toc = arch.toc.data pprint.pprint(toc) | def show(nm, arch, onfile=False, fn=None): if type(arch.toc) == type({}): print " Name: (ispkg, pos, len)" toc = arch.toc else: print " pos, length, uncompressed, iscompressed, type, name" toc = arch.toc.data pprint.pprint(toc) | 448,816 |
def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | 448,817 |
def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | 448,818 |
def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | 448,819 |
def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | def _rmdir(path): """ Remove dirname(os.path.abspath(path)) and all its contents, but only if: 1. It doesn't start with BUILDPATH 2. It is a directory and not empty (otherwise continue without removing the directory) 3. BUILDPATH and SPECPATH don't start with it 4. The --noconfirm option is set, or sys.stdout is a tty... | 448,820 |
def check_egg(pth): """Check if path points to a file inside a python egg file (or to an egg directly).""" if os.path.altsep: pth = pth.replace(os.path.altsep, os.path.sep) components = pth.split(os.path.sep) for i, name in enumerate(components): if name.lower().endswith(".egg"): eggpth = os.path.sep.join(components[:i... | def check_egg(pth): """Check if path points to a file inside a python egg file (or to an egg directly).""" if os.path.altsep: pth = pth.replace(os.path.altsep, os.path.sep) components = pth.split(os.path.sep) for i, name in enumerate(components): if name.lower().endswith(".egg"): eggpth = os.path.sep.join(components[:i... | 448,821 |
def assemble(self): print "running Analysis", os.path.basename(self.out) # Reset seen variable to correctly discover dependencies # if there are multiple Analysis in a single specfile. bindepend.seen = {} | def assemble(self): print "running Analysis", os.path.basename(self.out) # Reset seen variable to correctly discover dependencies # if there are multiple Analysis in a single specfile. bindepend.seen = {} | 448,822 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,823 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,824 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,825 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,826 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,827 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,828 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,829 |
def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | 448,830 |
def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | 448,831 |
def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | def assemble(self): print "building EXE from", os.path.basename(self.out) trash = [] if not os.path.exists(os.path.dirname(self.name)): os.makedirs(os.path.dirname(self.name)) outf = open(self.name, 'wb') exe = self._bootloader_postfix('support/loader/run') exe = os.path.join(HOMEPATH, exe) if target_iswin or cygwin: e... | 448,832 |
def run_makespec(opts, args): # Split pathex by using the path separator temppaths = opts.pathex[:] opts.pathex = [] for p in temppaths: opts.pathex.extend(string.split(p, os.pathsep)) spec_file = Makespec.main(args, **opts.__dict__) print "wrote %s" % spec_file return spec_file | def run_makespec(opts, args): # Split pathex by using the path separator temppaths = opts.pathex[:] opts.pathex = [] for p in temppaths: opts.pathex.extend(p.split(os.pathsep)) spec_file = Makespec.main(args, **opts.__dict__) print "wrote %s" % spec_file return spec_file | 448,833 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,834 |
def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | def checkCache(fnm, strip, upx): # On darwin a cache is required anyway to keep the libaries # with relative install names if not strip and not upx and sys.platform != 'darwin' and sys.platform != 'win32': return fnm global winresource, winmanifest if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 # Lo... | 448,835 |
def runtests(alltests, filters=None, configfile=None, run_executable=1, verbose=False): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = ope... | def runtests(alltests, filters=None, configfile=None, run_executable=1, verbose=False): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = ope... | 448,836 |
def runtests(alltests, filters=None, configfile=None, run_executable=1, verbose=False): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = ope... | def runtests(alltests, filters=None, configfile=None, run_executable=1, verbose=False): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = ope... | 448,837 |
def find_files(self, ignore_policies=True): """ Search shared and private assemblies and return a list of files. If any files are not found, return an empty list. IMPORTANT NOTE: For the purpose of getting the dependent assembly files of an executable, the publisher configuration (aka policy) should be ignored (which... | def find_files(self, ignore_policies=True): """ Search shared and private assemblies and return a list of files. If any files are not found, return an empty list. IMPORTANT NOTE: For the purpose of getting the dependent assembly files of an executable, the publisher configuration (aka policy) should be ignored (which... | 448,838 |
def __init__(self, pathlist=None, importers=None, ownertypes=None): if pathlist is None: self.path = sys.path else: self.path = pathlist if ownertypes == None: self.ownertypes = _globalownertypes else: self.ownertypes = ownertypes if importers: self.shadowpath = importers else: self.shadowpath = {} self.inMakeOwner = 0... | def __init__(self, pathlist=None, importers=None, ownertypes=None): self.path = pathlist if ownertypes == None: self.ownertypes = _globalownertypes else: self.ownertypes = ownertypes if importers: self.shadowpath = importers else: self.shadowpath = {} self.inMakeOwner = 0 self.building = {} | 448,839 |
def __str__(self): return str(self.path) | def __str__(self): return str(self.path) | 448,840 |
def getmod(self, nm): mod = None for thing in self.path: if isinstance(thing, STRINGTYPE): owner = self.shadowpath.get(thing, -1) if owner == -1: owner = self.shadowpath[thing] = self.makeOwner(thing) if owner: mod = owner.getmod(nm) else: mod = thing.getmod(nm) if mod: break return mod | def getmod(self, nm): mod = None for thing in (self.path or sys.path): if isinstance(thing, STRINGTYPE): owner = self.shadowpath.get(thing, -1) if owner == -1: owner = self.shadowpath[thing] = self.makeOwner(thing) if owner: mod = owner.getmod(nm) else: mod = thing.getmod(nm) if mod: break return mod | 448,841 |
def runtests(alltests, filters=None, configfile=None, run_executable=1): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = open("python_exe.b... | def runtests(alltests, filters=None, configfile=None, run_executable=1): info = "Executing PyInstaller tests in: %s" % os.getcwd() print "*" * min(80, len(info)) print info print "*" * min(80, len(info)) OPTS = '' if configfile: # todo: quote correctly OTPS = ' -c "%s"' % configfile build_python = open("python_exe.b... | 448,842 |
def update_details_page(): iface = iface_cache.get_interface(model.canonical_iface_uri(uri.get_text())) about.set_text('%s - %s' % (iface.get_name(), iface.summary)) icon_path = iface_cache.get_icon_path(iface) from zeroinstall.gtkui import icon icon_pixbuf = icon.load_icon(icon_path) if icon_pixbuf: icon_widget.set_fr... | def update_details_page(): iface = iface_cache.get_interface(model.canonical_iface_uri(uri.get_text())) about.set_text('%s - %s' % (iface.get_name(), iface.summary)) icon_path = iface_cache.get_icon_path(iface) from zeroinstall.gtkui import icon icon_pixbuf = icon.load_icon(icon_path) if icon_pixbuf: icon_widget.set_fr... | 448,843 |
def finish(): import xdgutils iface = iface_cache.get_interface(model.canonical_iface_uri(uri.get_text())) | def finish(): import xdgutils iface = iface_cache.get_interface(model.canonical_iface_uri(uri.get_text())) | 448,844 |
def solve(self, root_interface, root_arch): # TODO: We need some way to figure out which feeds to include. # Currently, we include any feed referenced from anywhere but # this is probably too much. We could insert a dummy optimial # implementation in stale/uncached feeds and see whether it # selects that. | def solve(self, root_interface, root_arch): # TODO: We need some way to figure out which feeds to include. # Currently, we include any feed referenced from anywhere but # this is probably too much. We could insert a dummy optimial # implementation in stale/uncached feeds and see whether it # selects that. | 448,845 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 448,846 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 448,847 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 448,848 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 448,849 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 448,850 |
def size_prepared_cb(loader, width, height): dest_width = icon_width or width dest_height = icon_height or height | def size_prepared_cb(loader, width, height): dest_width = icon_width or width dest_height = icon_height or height | 448,851 |
def _compile_po_files(self): i18nfiles = [] for mo in glob.glob("locale/*/LC_MESSAGES/zero-install.mo"): dest = os.path.dirname(os.path.join('share', mo)) i18nfiles.append((dest, [mo])) return i18nfiles | def _compile_po_files(self): i18nfiles = [] mo_files = glob.glob("share/locale/*/LC_MESSAGES/zero-install.mo") assert mo_files for mo in mo_files: dest = os.path.dirname(os.path.join('share', mo)) i18nfiles.append((dest, [mo])) return i18nfiles | 448,852 |
def testLangs(self): try: locale.setlocale(locale.LC_ALL, 'en_US.UTF8') | def testLangs(self): try: locale.setlocale(locale.LC_ALL, 'en_US.UTF8') | 448,853 |
def recurse(sub): # To ensure that a line-by-line comparison of the manifests # is possible, we require that filenames don't contain newlines. # Otherwise, you can name a file so that the part after the \n # would be interpreted as another line in the manifest. if '\n' in sub: raise BadDigest("Newline in filename '%s'"... | def recurse(sub): # To ensure that a line-by-line comparison of the manifests # is possible, we require that filenames don't contain newlines. # Otherwise, you can name a file so that the part after the \n # would be interpreted as another line in the manifest. if '\n' in sub: raise BadDigest("Newline in filename '%s'"... | 448,854 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | 448,855 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | 448,856 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | 448,857 |
def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) | 448,858 |
def assert_manifest(self, required): alg_name = required.split('=', 1)[0] manifest.fixup_permissions(self.tmpdir) sha1 = alg_name + '=' + manifest.add_manifest_file(self.tmpdir, manifest.get_algorithm(alg_name)).hexdigest() self.assertEquals(sha1, required) | def assert_manifest(self, required): alg_name = required.split('=', 1)[0] manifest.fixup_permissions(self.tmpdir) sha1 = alg_name + '=' + manifest.add_manifest_file(self.tmpdir, manifest.get_algorithm(alg_name)).hexdigest() self.assertEquals(sha1, required) | 448,859 |
def setUp(self): AbstractTestUnpack.setUp(self) unpack._tar_version = 'Solaris tar' assert not unpack._gnu_tar() | def setUp(self): AbstractTestUnpack.setUp(self) unpack._tar_version = 'Solaris tar' assert not unpack._gnu_tar() | 448,860 |
def solve(self, root_interface, arch): """Get the best implementation of root_interface and all of its dependencies. @param root_interface: the URI of the program to be solved @type root_interface: str @param arch: the desired target architecture @type arch: L{arch.Architecture} @postcondition: self.ready, self.selecti... | def solve(self, root_interface, root_arch): """Get the best implementation of root_interface and all of its dependencies. @param root_interface: the URI of the program to be solved @type root_interface: str @param arch: the desired target architecture @type arch: L{arch.Architecture} @postcondition: self.ready, self.se... | 448,861 |
def solve(self, root_interface, arch): """Get the best implementation of root_interface and all of its dependencies. @param root_interface: the URI of the program to be solved @type root_interface: str @param arch: the desired target architecture @type arch: L{arch.Architecture} @postcondition: self.ready, self.selecti... | def solve(self, root_interface, arch): """Get the best implementation of root_interface and all of its dependencies. @param root_interface: the URI of the program to be solved @type root_interface: str @param root_arch: the desired target architecture @type root_arch: L{arch.Architecture} @postcondition: self.ready, se... | 448,862 |
def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | 448,863 |
def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | 448,864 |
def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | 448,865 |
def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]' | 448,866 |
def set_items(self, items): self.model.clear() selected = self.policy.solver.selections.get(self.interface, None) for item, unusable in items: new = self.model.append() self.model[new][ITEM] = item self.model[new][VERSION] = item.get_version() self.model[new][RELEASED] = item.released or "-" self.model[new][FETCH] = ut... | def set_items(self, items): self.model.clear() selected = self.policy.solver.selections.get(self.interface, None) for item, unusable in items: new = self.model.append() self.model[new][ITEM] = item self.model[new][VERSION] = item.get_version() self.model[new][RELEASED] = item.released or "-" self.model[new][FETCH] = ut... | 448,867 |
def _compile_po_files(self): i18nfiles = [] mo_files = glob.glob("share/locale/*/LC_MESSAGES/zero-install.mo") assert mo_files for mo in mo_files: dest = os.path.dirname(os.path.join('share', mo)) i18nfiles.append((dest, [mo])) return i18nfiles | def _compile_po_files(self): i18nfiles = [] mo_files = glob.glob("share/locale/*/LC_MESSAGES/zero-install.mo") assert mo_files for mo in mo_files: dest = os.path.dirname(mo) i18nfiles.append((dest, [mo])) return i18nfiles | 448,868 |
def set_stability_policy(combo): i = stability.get_active() if i == 0: new_stability = None else: name = stability.get_model()[i][0].lower() new_stability = stability_levels[name] interface.set_stability_policy(new_stability) writer.save_interface(interface) policy.recalculate() | def set_stability_policy(combo): i = stability.get_active() if i == 0: new_stability = None else: name = ['stable', 'testing', 'developer'][i-1] new_stability = stability_levels[name] interface.set_stability_policy(new_stability) writer.save_interface(interface) policy.recalculate() | 448,869 |
def _delete(self): errors = [] | def _delete(self): errors = [] | 448,870 |
def find_dependency_candidates(requiring_impl_var, dependency): dep_iface = self.iface_cache.get_interface(dependency.interface) dep_union = [sat.neg(requiring_impl_var)] for candidate in impls_for_iface[dep_iface]: for r in dependency.restrictions: if not r.meets_restriction(candidate): #warn("%s rejected due to %s", ... | def find_dependency_candidates(requiring_impl_var, dependency): dep_iface = self.iface_cache.get_interface(dependency.interface) dep_union = [sat.neg(requiring_impl_var)] for candidate in impls_for_iface[dep_iface]: for r in dependency.restrictions: if candidate.__class__ is not _DummyImpl and not r.meets_restriction(c... | 448,871 |
def find_dependency_candidates(requiring_impl_var, dependency): dep_iface = self.iface_cache.get_interface(dependency.interface) dep_union = [sat.neg(requiring_impl_var)] for candidate in impls_for_iface[dep_iface]: for r in dependency.restrictions: if not r.meets_restriction(candidate): #warn("%s rejected due to %s", ... | deffind_dependency_candidates(requiring_impl_var,dependency):dep_iface=self.iface_cache.get_interface(dependency.interface)dep_union=[sat.neg(requiring_impl_var)]forcandidateinimpls_for_iface[dep_iface]:forrindependency.restrictions:ifnotr.meets_restriction(candidate):#warn("%srejecteddueto%s",candidate.get_version(),r... | 448,872 |
def getPercentage(self): result = self.get_prop('Percentage') if result is None: result, __, __, __ = self._transaction.proxy.GetProgress() return result | def getPercentage(self): result = self.get_prop('Percentage') if result is None: result, __, __, __ = self.proxy.GetProgress() return result | 448,873 |
def __package_cb(self, status, id, summary): from zeroinstall.injector import distro | def __package_cb(self, status, id, summary): from zeroinstall.injector import distro | 448,874 |
def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | 448,875 |
def setcontents(self,path,contents): resp = self._request(path,"PUT",contents) resp.close() if resp.status == 405: raise ResourceInvalidError(path) if resp.status == 409: raise ParentDirectoryMissingError(path) if resp.status not in (200,201): raise_generic_error(response,"setcontents",path) | def setcontents(self,path,contents): resp = self._request(path,"PUT",contents) resp.close() if resp.status == 405: raise ResourceInvalidError(path) if resp.status == 409: raise ParentDirectoryMissingError(path) if resp.status not in (200,201): raise_generic_error(response,"setcontents",path) | 448,876 |
def __init__(self, file_factory=None): super(FS, self).__init__(thread_synchronize=_thread_syncronize_default) self.dir_entry_factory = DirEntry self.file_factory = file_factory or MemoryFile | def __init__(self, file_factory=None): super(MemoryFS, self).__init__(thread_synchronize=_thread_syncronize_default) self.dir_entry_factory = DirEntry self.file_factory = file_factory or MemoryFile | 448,877 |
def rename(self, src, dst): src_dir,src_name = pathsplit(src) src_entry = self._get_dir_entry(src) if src_entry is None: raise ResourceNotFoundError(src) open_files = src_entry.open_files[:] for f in open_files: f.flush() f.path = dst | def rename(self, src, dst): src_dir,src_name = pathsplit(src) src_entry = self._get_dir_entry(src) if src_entry is None: raise ResourceNotFoundError(src) open_files = src_entry.open_files[:] for f in open_files: f.flush() f.path = dst | 448,878 |
def setcontents(self, path, data, chunk_size=64*1024): return self.wrapped_fs.setcontents(self._encode(path), data, chunk_size=chunk_size) | def setcontents(self, path, data, chunk_size=64*1024): return self.wrapped_fs.setcontents(self._encode(path), data, chunk_size=chunk_size) | 448,879 |
def createfile(self, path, data=""): """A convenience method to create a new file from a string. | def createfile(self, path, data=""): """A convenience method to create a new file from a string. | 448,880 |
def listdir(self, path="/", wildcard=None, full=False, absolute=False, dirs_only=False, files_only=False): | deflistdir(self,path="/",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): | 448,881 |
def listdir(self, path="/", wildcard=None, full=False, absolute=False, dirs_only=False, files_only=False): | deflistdir(self,path="/",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): | 448,882 |
def __nonzero__(self): return False | def __nonzero__(self): return False | 448,883 |
def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | 448,884 |
def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | 448,885 |
def open(self, path, mode="r", **kwargs): path = normpath(relpath(path)) | def open(self, path, mode="r", **kwargs): path = normpath(relpath(path)) | 448,886 |
def open(self, path, mode="r", **kwargs): path = normpath(path) self.zip_path = path | def open(self, path, mode="r", **kwargs): path = normpath(relpath(path)) self.zip_path = path | 448,887 |
def wrapper(self,*args,**kwds): try: return func(self,*args,**kwds) except (OSError,IOError), e: (exc_type,exc_inst,tb) = sys.exc_info() path = getattr(e,"filename",None) if path and path[0] == "/" and hasattr(self,"root_path"): path = normpath(path) if isprefix(self.root_path,path): path = path[len(self.root_path):] i... | def wrapper(self,*args,**kwds): try: return func(self,*args,**kwds) except (OSError,IOError), e: (exc_type,exc_inst,tb) = sys.exc_info() path = getattr(e,"filename",None) if path and path[0] == "/" and hasattr(self,"root_path"): path = normpath(path) if isprefix(self.root_path,path): path = path[len(self.root_path):] i... | 448,888 |
def getinfo(self, path): npath = self._normpath(path) stats = self.client.stat(npath) info = dict((k, getattr(stats, k)) for k in dir(stats) if not k.startswith('__') ) info['size'] = info['st_size'] ct = info.get('st_ctime', None) if ct is not None: info['created_time'] = datetime.datetime.fromtimestamp(ct) at = info.... | def getinfo(self, path): npath = self._normpath(path) stats = self.client.stat(npath) info = dict((k, getattr(stats, k)) for k in dir(stats) if not k.startswith('__') ) info['size'] = info['st_size'] ct = info.get('st_ctime', None) if ct is not None: info['created_time'] = datetime.datetime.fromtimestamp(ct) at = info.... | 448,889 |
def __init__(self): self.closed = False | def __init__(self): self.closed = False | 448,890 |
def get_path(p): if not full or absolute: return pathjoin(path, p) | def get_path(p): if not full or absolute: return pathjoin(path, p) | 448,891 |
def __init__(self, path, memory_fs, value, mode): self.closed = False self.path = path self.memory_fs = memory_fs self.mode = mode | def __init__(self, path, memory_fs, value, mode): self.closed = False self.path = path self.memory_fs = memory_fs self.mode = mode | 448,892 |
def __init__(self, path, memory_fs, value, mode): self.closed = False self.path = path self.memory_fs = memory_fs self.mode = mode | def __init__(self, path, memory_fs, value, mode): self.closed = False self.path = path self.memory_fs = memory_fs self.mode = mode | 448,893 |
def _uncache(self,path,added=False,removed=False,unmoved=False): cache = self._cache names = list(iteratepath(path)) # If it's not the root dir, also clear some items for ancestors if names: # Clear cached 'getinfo' and 'getsize' for all ancestors for name in names[:-1]: cache[""].pop("getinfo",None) cache[""].pop("get... | def _uncache(self,path,added=False,removed=False,unmoved=False): cache = self._cache names = list(iteratepath(path)) # If it's not the root dir, also clear some items for ancestors if names: # Clear cached 'getinfo' and 'getsize' for all ancestors for name in names[:-1]: cache[""].pop("getinfo",None) cache[""].pop("get... | 448,894 |
def listdir(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): """List contents of a directory.""" keys = self._list_keys(self,path) entries = self._filter_keys(path,keys,wildcard,full,absolute,dirs_only,files_only) return [nm for (nm,k) in entries] | def listdir(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): """List contents of a directory.""" keys = self._list_keys(path) entries = self._filter_keys(path,keys,wildcard,full,absolute,dirs_only,files_only) return [nm for (nm,k) in entries] | 448,895 |
def listdirinfo(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): keys = self._list_keys(self,path) entries = self._listdir_helper(path,keys,wildcard,full,absolute,dirs_only,files_only) return [(nm,self._get_key_info(k)) for (nm,k) in entries] | def listdirinfo(self,path="./",wildcard=None,full=False,absolute=False,dirs_only=False,files_only=False): keys = self._list_keys(path) entries = self._listdir_helper(path,keys,wildcard,full,absolute,dirs_only,files_only) return [(nm,self._get_key_info(k)) for (nm,k) in entries] | 448,896 |
def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_synchronize_default, encoding=None, create=False): """ Creates an FS object that represents the OS Filesystem under a given root path | def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_synchronize_default, encoding=None, create=False): """ Creates an FS object that represents the OS Filesystem under a given root path | 448,897 |
def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_synchronize_default, encoding=None, create=False): """ Creates an FS object that represents the OS Filesystem under a given root path | def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_synchronize_default, encoding=None, create=False): """ Creates an FS object that represents the OS Filesystem under a given root path | 448,898 |
def getsyspath(self, path, allow_none=False): path = relpath(normpath(path)).replace("/",os.sep) path = os.path.join(self.root_path, path) if not isinstance(path,unicode): if self.encoding is None: path = path.decode(sys.getfilesystemencoding()) else: path = path.decode(self.encoding) return path | def getsyspath(self, path, allow_none=False): path = relpath(normpath(path)).replace("/",os.sep) path = os.path.join(self.root_path, path) path = self._decode_path(path) return path | 448,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.