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
This commit is contained in:
rdb
2017-01-09 20:38:33 +01:00
parent 4ed199cece
commit 43a5f2a9f2
2 changed files with 7 additions and 4 deletions

View File

@@ -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(),

View File

@@ -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: