def main(): parser = OptionParser() _options, positional_args = parser.parse_args() if not positional_args: sys.exit("No DLLs given.") for filename in positional_args: my_print("Filename: %s" % filename) my_print("Version Information: %s" % getWindowsDLLVersion(filename)) my_print("SXS information (manifests):") sxs = getSxsFromDLL(filename=filename, with_data=True) if sxs: my_print(sxs) my_print("DLLs recursively dependended (depends.exe):") with TimerReport( message="Finding dependencies for %s took %%.2f seconds" % filename): r = detectBinaryPathDLLsWindowsDependencyWalker( is_main_executable=False, source_dir="notexist", original_dir=os.path.dirname(filename), binary_filename=filename, package_name=None, use_cache=False, update_cache=False, ) for dll_filename in sorted(r): my_print(" %s" % dll_filename) my_print("Total: %d" % len(r))
def action(stage_dir, root, path): # We need only the actual path, pylint: disable=unused-argument sxs = getSxsFromDLL(path) if sxs: my_print(path, sxs)
def decide(root, filename): return filename.endswith((".so", ".pyd")) and \ not filename.startswith("libpython") and \ getSxsFromDLL(os.path.join(root,filename))
def decide(root, filename): return ( filename.endswith((".so", ".pyd")) and not filename.startswith("libpython") and getSxsFromDLL(os.path.join(root, filename)) )
def main(): parser = OptionParser() parser.add_option( "--verbose", action="store_true", dest="verbose", default=False, help="""\ Be verbose in output. Default is %default.""", ) parser.add_option( "--pefile", action="store_true", dest="pefile", default=False, help="""\ Use pefile dependencies. Default is %default.""", ) options, positional_args = parser.parse_args() if not positional_args: sys.exit("No DLLs given.") for filename in positional_args: print("Filename:", filename) print("Version Information:", getWindowsDLLVersion(filename)) print("DLLs directly dependended (pefile):", getPEFileInformation(filename)) print("SXS information (manifests):") sxs = getSxsFromDLL(filename=filename, with_data=True) if sxs: print(sxs) print("DLLs recursively dependended (pefile):") if options.pefile: with TimerReport( message="Finding dependencies for %s took %%.2f seconds" % filename): from nuitka import Options Options.options.dependency_tool = "pefile" r = detectBinaryPathDLLsWindowsPE( is_main_executable=False, source_dir="notexist", original_dir=os.path.dirname(filename), binary_filename=filename, package_name=None, use_cache=False, update_cache=True, ) Options.options.dependency_tool = "depends.exe" for dll_filename in sorted(r): print(" ", dll_filename) print("Total: %d" % len(r)) print("DLLs recursively dependended (depends.exe):") with TimerReport( message="Finding dependencies for %s took %%.2f seconds" % filename): r = detectBinaryPathDLLsWindowsDependencyWalker( is_main_executable=False, source_dir="notexist", original_dir=os.path.dirname(filename), binary_filename=filename, package_name=None, use_cache=False, update_cache=False, ) for dll_filename in sorted(r): print(" ", dll_filename) print("Total: %d" % len(r))