diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index ac528371c7..6a7d8ce521 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2887,8 +2887,8 @@ if tp_dir is not None: pydll += ".dll" CopyFile(GetOutputDir() + "/bin" + pydll, SDK["PYTHON"] + pydll) - #for fn in glob.glob(SDK["PYTHON"] + "/vcruntime*.dll"): - # CopyFile(GetOutputDir() + "/bin/", fn) + for fn in glob.glob(SDK["PYTHON"] + "/vcruntime*.dll"): + CopyFile(GetOutputDir() + "/bin/", fn) # Copy the whole Python directory. CopyTree(GetOutputDir() + "/python", SDK["PYTHON"]) @@ -2907,7 +2907,7 @@ if tp_dir is not None: else: idents = () - for ident in tree.findall('./{urn:schemas-microsoft-com:asm.v1}dependency/{urn:schemas-microsoft-com:asm.v1}dependentAssembly/{urn:schemas-microsoft-com:asm.v1}assemblyIdentity'): + for ident in idents: sxs_name = '_'.join([ ident.get('processorArchitecture'), ident.get('name').lower(), diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index ee903a3940..24f3614337 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -980,7 +980,10 @@ def WriteFile(wfile, data, newline=None): data = data.replace('\n', newline) try: - dsthandle = open(wfile, "w") + if sys.version_info >= (3, 0): + dsthandle = open(wfile, "w", newline='') + else: + dsthandle = open(wfile, "w") dsthandle.write(data) dsthandle.close() except: