[Scons-users] Error when passing from python 3.5.4 to python 3.6

Pierre-Luc Boily pierreluc.boily at gmail.com
Tue Jul 21 16:16:33 EDT 2020


The problem is still there with scons 4.0.1, but I decided to use qt tool
that ships with scons.  I was not even aware of this, we were using the
external tool since forever....

But I still do have a weird problem.  It looks like scons Uic does
something that I don't need, the -impl option.  It looks like it is not
part of the Uic application that ships with my version of qt.  Is there a
way to remove the --impl from 'QT_UICCOM': ?

scons: done reading SConscript files.
scons: Building targets ...
C:\svn\3rdParty\3rdPartyPackages\Qt-5.12.1_vs2017\5.12.1\msvc2017\bin\uic
-o build\sr\speech\ASREngineSpawner\ASREngineWidget.h
sr\speech\ASREngineSpawner\ASREngineWidget.ui
C:\svn\3rdParty\3rdPartyPackages\Qt-5.12.1_vs2017\5.12.1\msvc2017\bin\uic
-impl ASREngineWidget.h -o
build\sr\speech\ASREngineSpawner\uic_ASREngineWidget.cc
sr\speech\ASREngineSpawner\ASREngineWidget.ui
Unknown option 'impl'.
scons: *** [build\sr\speech\ASREngineSpawner\ASREngineWidget.h] Error 1
scons: building terminated because of errors.
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
PS C:\SVN\products\faa_mx\integ-newScons.4.0>
C:\svn\3rdParty\3rdPartyPackages\Qt-5.12.1_vs2017\5.12.1\msvc2017\bin\uic
-help
Usage:
C:\svn\3rdParty\3rdPartyPackages\Qt-5.12.1_vs2017\5.12.1\msvc2017\bin\uic.exe
[options] [uifile]
Qt User Interface Compiler version 5.12.1

Options:
  -?, -h, --help                Displays this help.
  -v, --version                 Displays version information.
  -d, --dependencies            Display the dependencies.
  -o, --output <file>           Place the output into <file>
  -p, --no-protection           Disable header protection.
  -n, --no-implicit-includes    Disable generation of #include-directives.
  -s, --no-stringliteral        Deprecated. The use of this option won't
take
                                any effect.
  --postfix <postfix>           Postfix to add to all generated classnames.
  --tr, --translate <function>  Use <function> for i18n.
  --include <include-file>      Add #include <include-file> to <file>.
  -g, --generator <java|cpp>    Select generator.
  --idbased                     Use id based function for i18n

Le lun. 20 juill. 2020, à 23 h 45, Pierre-Luc Boily <
pierreluc.boily at gmail.com> a écrit :

> Thx.  Ill try with scons 4 and with the qt tool that ships with scons.
> Let you know...
>
> Le lun. 20 juill. 2020, à 08 h 37, Thomas Berg <merlin66b at gmail.com> a
> écrit :
>
>>
>> On Sat, 18 Jul 2020 at 00:35, Pierre-Luc Boily <pierreluc.boily at gmail.com>
>> wrote:
>>
>>> I was pretty sure the problem was in qt5 tool and not in scons ?
>>>
>>>
>> That could very well be, but volunteers who devote their spare time to
>> help may have a policy to only start helping you when you have upgraded to
>> the latest version. In general it avoids wasting time on already solved
>> issues.
>>
>> It could be that upgrading doesn't help, but things may also have
>> happened in SCons that could affect this. If you still see the problem
>> after upgrading you'll likely get the help you need.
>>
>>
>>
>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>> 373:
>>> cpp, cpp_contents, out_sources)
>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>> 229:
>>> if cpp and re.search(inc_moc_cpp, cpp_contents, re.M):
>>> File "C:\Python\Python3.6.8\lib\re.py", line 182:
>>>
>>>
>> Regarding the error, it's similar to an issue I saw myself when switching
>> to python 3. SCons has two ways to get the content of a file, one returns
>> text (python unicode), and the other returns bytes. If that's the problem,
>> swapping out calls to get_contents() with get_text_contents() might help in
>> the tool source code.
>>
>> I see you are using an external qt tool instead of the one that ships
>> with scons. I think the qt tool that ships with scons supports Qt5 now, so
>> you could consider trying it instead of this possibly unmaintained tool.
>>
>> Cheers,
>> Thomas
>>
>>
>> On Sat, 18 Jul 2020 at 00:35, Pierre-Luc Boily <pierreluc.boily at gmail.com>
>> wrote:
>>
>>> I was pretty sure the problem was in qt5 tool and not in scons ?
>>>
>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>> 373:
>>> cpp, cpp_contents, out_sources)
>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>> 229:
>>> if cpp and re.search(inc_moc_cpp, cpp_contents, re.M):
>>> File "C:\Python\Python3.6.8\lib\re.py", line 182:
>>>
>>> Le ven. 17 juill. 2020, à 15 h 48, Bill Deegan <
>>> bill at baddogconsulting.com> a écrit :
>>>
>>>> Please update your SCons version to 4.0.1 and retry.
>>>> Note if you've installed scons via pip, you  should pip uninstall
>>>> scons, and then pip install scons as there's a windows specific pip+scons
>>>> issue.
>>>>
>>>> On Fri, Jul 17, 2020 at 9:09 AM Pierre-Luc Boily <
>>>> pierreluc.boily at gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Sorry to post this here, this is not direclty linked to scons, but to
>>>>> qt5
>>>>> tools.  I thought that maybe someone faced this problem before in the
>>>>> scons
>>>>> code.
>>>>>
>>>>>
>>>>> https://bitbucket.org/dirkbaechle/scons_qt5/issues/14/from-python-354-to-368-raise-sourceerror
>>>>>
>>>>> python : 3.6.8
>>>>> scons : 3.0.5
>>>>> os : windows 10
>>>>>
>>>>> Trying to update my python from 3.5.4 to 3.6.8 version and I stumbled
>>>>> on the
>>>>> exception below. I found something similar to this page :
>>>>>
>>>>> https://stackoverflow.com/questions/58328587/python-3-7-4-re-error-bad-escape-s-at-position-0
>>>>> .
>>>>> but I don`t understand... :
>>>>>
>>>>> PS C:\SVN\products\faa_mx\integ> scons -n
>>>>> scons: Reading SConscript files ...
>>>>> error: bad escape \m at position 37:
>>>>> File "C:\SVN\products\faa_mx\integ\SConstruct", line 30:
>>>>> sc_manager.build()
>>>>> File
>>>>>
>>>>> "C:\SVN\products\faa_mx\integ\cm\env\scons\utilities\sconscriptManager.py",
>>>>> line 44:
>>>>> duplicate=0)
>>>>> File
>>>>>
>>>>> "c:\python\python3.6.8\lib\site-packages\scons\SCons\Script\SConscript.py",
>>>>> line 668:
>>>>> return method(*args, **kw)
>>>>> File
>>>>>
>>>>> "c:\python\python3.6.8\lib\site-packages\scons\SCons\Script\SConscript.py",
>>>>> line 605:
>>>>> return _SConscript(self.fs, files, **subst_kw)
>>>>> File
>>>>>
>>>>> "c:\python\python3.6.8\lib\site-packages\scons\SCons\Script\SConscript.py",
>>>>> line 286:
>>>>> exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
>>>>> File
>>>>>
>>>>> "C:\SVN\products\faa_mx\integ\sr\speech\ASREngineSpawner\ASREngineSpawner.sc",
>>>>> line 12:
>>>>> lib_tgt = env.build_library(envService, ['ASREngineSpawner.cpp',
>>>>> 'ProcessManager.cpp'] + env.Glob('.ui'))
>>>>> File
>>>>>
>>>>> "C:\SVN\products\faa_mx\integ\cm\env\scons\adacelBuilders\pseudoBuilders.py",
>>>>> line 95:
>>>>> source=tgt)
>>>>> File
>>>>> "c:\python\python3.6.8\lib\site-packages\scons\SCons\Environment.py",
>>>>> line 260:
>>>>> return MethodWrapper.call(self, target, source, *args, **kw)
>>>>> File
>>>>> "c:\python\python3.6.8\lib\site-packages\scons\SCons\Environment.py",
>>>>> line 224:
>>>>> return self.method(*nargs, **kwargs)
>>>>> File "c:\python\python3.6.8\lib\site-packages\scons\SCons\Builder.py",
>>>>> line
>>>>> 645:
>>>>> return self.execute(env, target, source, OverrideWarner(kw), ekw)
>>>>> File "c:\python\python3.6.8\lib\site-packages\scons\SCons\Builder.py",
>>>>> line
>>>>> 564:
>>>>> tlist, slist = self.create_nodes(env, target, source)
>>>>> File "c:\python\python3.6.8\lib\site-packages\scons\SCons\Builder.py",
>>>>> line
>>>>> 528:
>>>>> target, source = self.emitter(target=tlist, source=slist, env=env)
>>>>> File "c:\python\python3.6.8\lib\site-packages\scons\SCons\Builder.py",
>>>>> line
>>>>> 353:
>>>>> target, source = e(target, source, env)
>>>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>>>> 373:
>>>>> cpp, cpp_contents, out_sources)
>>>>> File "C:\SVN\3rdParty\devTool\site_scons\site_tools\qt5_init.py", line
>>>>> 229:
>>>>> if cpp and re.search(inc_moc_cpp, cpp_contents, re.M):
>>>>> File "C:\Python\Python3.6.8\lib\re.py", line 182:
>>>>> return _compile(pattern, flags).search(string)
>>>>> File "C:\Python\Python3.6.8\lib\re.py", line 301:
>>>>> p = sre_compile.compile(pattern, flags)
>>>>> File "C:\Python\Python3.6.8\lib\sre_compile.py", line 562:
>>>>> p = sre_parse.parse(p, flags)
>>>>> File "C:\Python\Python3.6.8\lib\sre_parse.py", line 855:
>>>>> p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
>>>>> File "C:\Python\Python3.6.8\lib\sre_parse.py", line 416:
>>>>> not nested and not items))
>>>>> File "C:\Python\Python3.6.8\lib\sre_parse.py", line 502:
>>>>> code = _escape(source, this, state)
>>>>> File "C:\Python\Python3.6.8\lib\sre_parse.py", line 401:
>>>>> raise source.error("bad escape %s" % escape, len(escape))
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
>>>>> _______________________________________________
>>>>> Scons-users mailing list
>>>>> Scons-users at scons.org
>>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>>
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200721/1e44b1ae/attachment.html>


More information about the Scons-users mailing list