[Scons-users] sort function changes

Bill Deegan bill at baddogconsulting.com
Wed Oct 11 14:31:53 EDT 2017


We ran into same issue in our VariablesTests.py (a unit test).

Here's the implementation we used:

def cmp(a, b):
    """
    Define cmp because it's no longer available in python3
    Works under python 2 as well
    """
    return (a > b) - (a < b)

I'll make a note and see if we can provision this into
SConscript/SConstruct environment..


On Wed, Oct 11, 2017 at 8:03 AM, Mats Wichmann <mats at wichmann.us> wrote:

>
> This does not work with Python3, since cmp is gone:
>
>     Help(help_vars.GenerateHelpText(env, sort=cmp))
>
>
> Quick suggestion?
> _______________________________________________
> 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/20171011/0c36433b/attachment.html>


More information about the Scons-users mailing list