[Scons-users] Problem upgrading from 3.0.1 to 3.1.2

Steve Hill (Wireless) Steve.Hill1 at viavisolutions.com
Thu May 14 12:14:52 EDT 2020


Thanks. I have got to the bottom of it.

I am calling subst_list to get the list of paths (in $SOURCES, for instance) and assumed that returned strings. It actually returns a sequence of CmdStringHolder objects, which do not behave like strings when passed to os.path.splitdrive – in fact they result in an exception being thrown: ‘expected str, bytes or os.PathLike object, not CmdStringHolder’

Furthermore, it seems that, surprisingly, if an exception is thrown in the call, SCons doesn’t complain – it just ignores that the call even happened and simply stringifies the object instead. IMHO, this is questionable behaviour.

Anyway, I am now converting to string prior to calling splitdrive and all seems to be well…

Thanks again for your help,

S.


From: Scons-users <scons-users-bounces at scons.org> On Behalf Of Bill Deegan
Sent: 14 May 2020 16:45
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] Problem upgrading from 3.0.1 to 3.1.2

Please post a small, complete, runnable sample of this issue.
That will greatly simplify helping resolve the issue..

-Bill

On Thu, May 14, 2020 at 8:30 AM Mats Wichmann <mats at wichmann.us<mailto:mats at wichmann.us>> wrote:
On 5/14/20 3:26 AM, Steve Hill (Wireless) via Scons-users wrote:

> I am now trying to upgrade to 3.1.2 and Python 3.6.3 and get this:
>
> powerpc-eabi-gcc <stuff…> -o <edk_v10_1.Cygwinify object at
> 0x000001E1FEE95EB8> -c <edk_v10_1.Cygwinify object at 0x000001E1FEE95E10>
>
> Have I missed something in my Python 2 -> Python 3 port or has something
> changed in SCons between 3.0 and 3.1?

As a general note, it's not uncommon when converting from Py2 to Py3 to
run into things that give back an object reference instead of what you
were used to getting.

That said, for me at least, there's too much information omitted in your
snips to be able to tell more.

_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://urldefense.com/v3/__https:/pairlist4.pair.net/mailman/listinfo/scons-users__;!!Aa6LgkyVeQ!8eAyjf7h5c5BL_IFlCaGvu3B0g3p1Cd9P4ObitBExUl4rzEelFDb7thanLxENAoPfPQsGLIv$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200514/500cba06/attachment.html>


More information about the Scons-users mailing list