mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Move setting the environment variables into getMSVCInfo
This commit is contained in:
@@ -981,7 +981,7 @@ def getExpectedVisCVersion():
|
||||
|
||||
|
||||
MSVCinfo = None
|
||||
def getMSVCInfo(PYTHON, arch):
|
||||
def getMSVCInfo(PYTHON, arch, set_env=False):
|
||||
"""
|
||||
Fetch info from the system about MSVC, such as versions, paths, etc.
|
||||
"""
|
||||
@@ -1005,6 +1005,12 @@ def getMSVCInfo(PYTHON, arch):
|
||||
env = eval(runcmd('"%s" -c "%s"' % (PYTHON, cmd), getOutput=True, echoCmd=False))
|
||||
info = AttrDict(env)
|
||||
|
||||
if set_env:
|
||||
os.environ['PATH'] = info.path
|
||||
os.environ['INCLUDE'] = info.include
|
||||
os.environ['LIB'] = info.lib
|
||||
os.environ['LIBPATH'] = info.libpath
|
||||
|
||||
MSVCinfo = info
|
||||
return info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user