[Scons-dev] Python 2 and Python 3 on same project

Bill Deegan bill at baddogconsulting.com
Thu Jul 13 17:04:11 EDT 2017


I'm not sure there's a good way to determine if the sconsign is from
another version of python rather than just corrupted in some fashion.

There's no harm in having different files per python version, (or just .py3
for python 3 and no change for py 2 at this time).

sconsign is not tied to being a pickle, though that's the current
implementation.
We're open to faster options (if there are some).

Right now in one build I'm working with for a client, a null build takes
approx 55 seconds of which 10 seconds are spent writing the pickle.
Obviously a null build is not a normal build, but say your change only
requires one file rebuilt, and then you still write the entire sconsign. An
appreciable amount of runtime percentage wise is spent rewritting bits of
the sconsign which haven't changed..



On Thu, Jul 13, 2017 at 4:58 PM, Daniel Holth <dholth at gmail.com> wrote:

> It would make sense to replace the file because it should be very unusual
> to run the same SConstruct with multiple Pythons (unless you are a SCons
> developer unfortunately) and because the extension should depend on the
> version of the pickle protocol used, not the major version of Python.
>
> On Thu, Jul 13, 2017, 16:09 Bill Deegan <bill at baddogconsulting.com> wrote:
>
>> The previous code (which is currently commented out), had different file
>> extension for py3, so there'd be no collision.
>> Though a warning that a sconsign from opposite python version is present
>> might be wise.
>>
>>
>> On Thu, Jul 13, 2017 at 3:24 PM, Daniel Holth <dholth at gmail.com> wrote:
>>
>>> Would it make more sense to present a warning and then replace the
>>> .dblite file?
>>>
>>> On Thu, Jul 13, 2017 at 2:09 PM Bill Deegan <bill at baddogconsulting.com>
>>> wrote:
>>>
>>>> dblite.py line 43.
>>>>
>>>> If you uncomment that and then run the tests py2 and py3 some will
>>>> break because they are  looking for the file name without the .py3
>>>> extension.
>>>> Perhaps add a method or constant to QMTest/TestSCons.py which the
>>>> default file name and use that in the tests which fail?
>>>>
>>>> -Bill
>>>>
>>>> On Thu, Jul 13, 2017 at 10:01 AM, Russel Winder <russel at winder.org.uk>
>>>> wrote:
>>>>
>>>>> On Thu, 2017-07-13 at 09:10 -0400, Bill Deegan wrote:
>>>>> > Yes.
>>>>> >
>>>>> > There was a separate .py3 and .py2 version of sconsign.
>>>>> > Probably time to turn that back on and resolve test failures due to
>>>>> > changed
>>>>> > sconsign name.
>>>>> >
>>>>> > Care to give it a try?
>>>>> > ;)
>>>>> >
>>>>>
>>>>> Yes, I can do that. What change do I need to make for it to work?
>>>>>
>>>>> --
>>>>> Russel.
>>>>> ============================================================
>>>>> =================
>>>>> Dr Russel Winder     t:+44 20 7585 2200   voip:sip:
>>>>> russel.winder at ekiga.net
>>>>> 41 Buckmaster Road   m:+44 7770 465 077   xmpp:russel at winder.org.uk
>>>>> London SW11 1EN, UK  w: www.russel.org.uk skype:russel_winder
>>>>>
>>>>> _______________________________________________
>>>>> Scons-dev mailing list
>>>>> Scons-dev at scons.org
>>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Scons-dev mailing list
>>>> Scons-dev at scons.org
>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>
>>>
>>> _______________________________________________
>>> Scons-dev mailing list
>>> Scons-dev at scons.org
>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>
>>>
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170713/1765f246/attachment-0001.html>


More information about the Scons-dev mailing list