[Scons-users] SCons 3.0, sconsign files and Py2 vs Py3.. how to handle sconsign imcompatabilities

Bill Deegan bill at baddogconsulting.com
Sat Sep 9 22:13:37 EDT 2017


Greetings,

This is (I hope) the last issue gating 3.0 release.

*If we set the default pickle version to 2. (Currently set to
HIGHEST_AVAILABLE, which means 4 for py3.5+ and 2 for py2.7)*

If you run scons with py2.7 and then run again with py3.x, you'll get the
following:
...
scons: *** [$DISTDIR/scons-local-3.0.0.alpha.20170821.tar.gz]
UnicodeDecodeError : 'ascii' codec can't decode byte 0x80 in position 0:
ordinal not in range(128)

If you run scons with py3 and then rerun with py2.7, you'll get the
following:
 * It will rebuild everything you just built with py3

*If we set the default pickle version  to HIGHEST_AVAILABLE, which means 4
for py3.5+ and 2 for py2.7*


Here's the options I see to deal with this:
1. Always append .py3 to PY3 scons runs' sconsign files
2. Always append .py# to sconsign files based on what version of python was
used, ignore pre-existing .sconsigns from older versions
3. Do something complicated:
   a. Leave pickle version as HIGHEST_AVAILABLE, detect version of pickle
by reading first two bytes. If incompatible version detected, change file
name to .py# and try reading that one.  Always write to .sconsign? Or write
to file read.
   b. ?

Thoughts?

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170909/33dd0d63/attachment.html>


More information about the Scons-users mailing list