Author: Matti Picus <[email protected]>
Branch: py3.5
Changeset: r93859:2b8826f6536c
Date: 2018-02-21 23:53 -0500
http://bitbucket.org/pypy/pypy/changeset/2b8826f6536c/
Log: hack to fix missing path component on a buildbot with vs2017
installed
diff --git a/rpython/translator/platform/windows.py
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -73,7 +73,7 @@
if not os.path.exists(vcvars):
# even msdn does not know which to run
# see
https://msdn.microsoft.com/en-us/library/1700bbwd(v=vs.90).aspx
- # wich names both
+ # which names both
vcvars = os.path.join(toolsdir, 'vcvars32.bat')
import subprocess
@@ -99,6 +99,18 @@
for key, value in vcdict.items():
if key.upper() in ['PATH', 'INCLUDE', 'LIB']:
env[key.upper()] = value
+ if not _find_executable('mt.exe', env['PATH']):
+ # For some reason the sdk bin path is missing?
+ # put it together from some other env variables that happened to exist
+ # on the buildbot where this occurred
+ if 'WindowsSDKVersion' in vcdict and 'WindowsSdkDir' in vcdict:
+ binpath = vcdict['WindowsSdkDir'] + '\\bin\\' +
vcdict['WindowsSDKVersion'] + 'x86'
+ env['PATH'] += ';' + binpath
+ if not _find_executable('mt.exe', env['PATH']):
+ log.msg('Could not find mt.exe on path=%s' % env['PATH'])
+ log.msg('Running vsver %s set this env' % vsver)
+ for key, value in vcdict.items():
+ log.msg('%s=%s' %(key, value))
log.msg("Updated environment with vsver %d, using x64 %s" % (vsver,
x64flag,))
return env
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit