[Scons-users] visual studio 2019 with 2017 addon
    Pierre-Luc Boily 
    pierreluc.boily at gmail.com
       
    Thu Jun 11 14:09:10 EDT 2020
    
    
  
Hello,
I am trying your solution like that : 
        sconsEnv =
SCons.Environment.Environment(MSVC_VERSION=SCons.Script.GetOption('msvc'), 
                                                 TARGET_ARCH='x86_64',
                                                 MSVC_USE_SCRIPT='C:\Program
Files (x86)\Microsoft Visual
Studio\2017\Professional\VC\Auxiliary\Build\vcvarsx86_amd64.bat')
but I do have this error : 
AttributeError: __exit__:
  File "C:\SVN\products\ice\angola\integ-clean\SConstruct", line 27:
.
.
.
.
.
  File
"c:\users\pboily\appdata\local\programs\python\python35\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py",
line 579:
    stdout = common.get_output(script, args)
  File
"c:\users\pboily\appdata\local\programs\python\python35\lib\site-packages\scons\SCons\Tool\MSCommon\common.py",
line 192:
    with popen.stdout:
After a quick search I found that : 
"with statement requires an object with __enter__ and __exit__ methods"
In common.py, popen object is created by SCons.Action._subproc. It looks
like _subproc is based on subprocess.popen.
I am not sure if that object has an __enter__ and __exit__ methods?  Or is
there something else I am doing that is incorrect?
I also tried the following (removed with statement) : 
    #with popen.stdout:
    stdout = popen.stdout.read()
    #with popen.stderr:
    stderr = popen.stderr.read()
But then, I have the error : 
AttributeError: 'str' object has no attribute 'decode':
I guess that popen.stdout.read() returns an str object...
thx!
--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
    
    
More information about the Scons-users
mailing list