kwargs to Part API fail with scons 3.0.1
Issue #25
new
Reproducer attached, basically this call causes the error:
Part(parts_file='hello.parts',
SOME_VARIABLE='foo'
)
Result:
scons -D --tc=gcc
scons: Reading SConscript files ...
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\opt\Python27\lib\site-packages\parts\overrides\default_env.py", line 10, in <module>
TypeError: can only join an iterable of bytes (item 3 has type 'unicode'):
File "C:\Users\mavalle\Code\hello\SConstruct", line 6:
SOME_VARIABLE='foo'
File "C:\opt\Python27\lib\site-packages\parts\parts.py", line 28:
name=name,alias=alias,**kw)
File "C:\opt\Python27\lib\site-packages\parts\pnode\pnode_manager.py", line 221:
return self._node_types[ntype](ntype,*lst,**kw)
File "C:\opt\Python27\lib\site-packages\parts\pnode\pnode.py", line 125:
ret._setup_(gen_ID=True,*lst,**kw)
File "C:\opt\Python27\lib\site-packages\parts\pnode\part.py", line 674:
diff.update(diff_env(base_env,self.__env,['SKIP_CONCEPT_DEFINITION']))
File "C:\opt\Python27\lib\site-packages\parts\pnode\part.py", line 1442:
if complex_compare(d1[k],d2[k]):
File "C:\opt\Python27\lib\site-packages\parts\pnode\part.py", line 1398:
return SCons.Action._object_contents(v1) != SCons.Action._object_contents(v2)
File "C:\opt\Python27\scons-3.0.1\SCons\Action.py", line 185:
return _function_contents(obj.__call__.__func__)
File "C:\opt\Python27\scons-3.0.1\SCons\Action.py", line 301:
contents = [_code_contents(func.__code__, func.__doc__)]
File "C:\opt\Python27\scons-3.0.1\SCons\Action.py", line 264:
contents.extend(bytearray(',', 'utf-8').join(z))
This used to work with earlier version of scons. (This is with Python 2.7.14 and Parts 0.11.1)
Comments (3)
-
reporter -
It looks like an issue in SCons. I will see about getting a patch out for it
-
So after working a bit on this, I have a fix that is coming into Parts to address this. I think the new fix should be better and faster
- Log in to comment
After additional testing this does not happen when building with MSVC, only with --tc=gcc