ソースを参照

Fixes for Python 3.5:
- Disable conversion to Windows newlines, which is causing double Windows newlines for Config.prc
- We need to copy vcruntime140.dll to the bin directory for Python 3.5+ build using MSVC 2010 to work

rdb 9 年 前
コミット
43a5f2a9f2
2 ファイル変更7 行追加4 行削除
  1. 3 3
      makepanda/makepanda.py
  2. 4 1
      makepanda/makepandacore.py

+ 3 - 3
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(),

+ 4 - 1
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: