[Scons-dev] [Scons-users] SCons 3.0.0.alpha.20170821 is available for your testing

Tim Jenness tjenness at lsst.org
Tue Aug 22 15:25:17 EDT 2017


Thanks for this.

This alpha does not include the fix to get_text_contents in Node/FS.py — get_text_contents can not ever return bytes. When the scanner finds a Latin-1 source file (such as those in boost:python) it does not decode it properly and the content is returned in bytes, breaking all the downstream code. This was discussed back in July. I need to apply the following fix. The decision back in July was that a patch should try a few obvious candidates before decoding with errors ignored.

PS Can you fix the spelling of my name in the release notes? “Jenness” not “Jennes”.



diff --git a/engine/SCons/Node/FS.py.orig b/engine/SCons/Node/FS.py
index 517c00f..7d10097 100644
--- a/engine/SCons/Node/FS.py.orig
+++ b/engine/SCons/Node/FS.py
@@ -2624,11 +2624,7 @@ class File(Base):
             return contents[len(codecs.BOM_UTF16_LE):].decode('utf-16-le')
         if contents[:len(codecs.BOM_UTF16_BE)] == codecs.BOM_UTF16_BE:
             return contents[len(codecs.BOM_UTF16_BE):].decode('utf-16-be')
-        try:
-            return contents.decode()
-        except (UnicodeDecodeError, AttributeError) as e:
-            return contents
-
+        return contents.decode(errors="ignore")
 
     def get_content_hash(self):
         """



> On Aug 21, 2017, at 16:51 , Bill Deegan <bill at baddogconsulting.com> wrote:
> 
> All,
> 
> You can install via: (PLEASE ONLY DO IN A VIRTUALENV AS THIS IS PRERELEASE)
> 
> pip install --index-url https://test.pypi.org/simple/ <https://test.pypi.org/simple/> scons==3.0.0.alpha.20170821
> 
> This version supports: Python 2.7.x, 3.5.x, 3.6.x
> 
> NOTE:
> 1. You must rm your .sconsign file if you switch python versions between 2 and 3.
> 2. It is likely you will see a large number of rebuilds due to some changes with signature generation for python action functions.
> 
> Please report any issues you find to the scons users mailing list.
> 
> 
> 
> Here's the list of changes:
> RELEASE 3.0.0.alpha.20170821 - Mon, 21 Aug 2017 16:15:02 -0700
> 
> NOTE: This is a major release.  You should expect that some targets may rebuild when upgrading.
> Significant changes in some python action signatures. Also switching between PY 2 and PY 3.5, 3.6
> may cause rebuilds.  In no case should rebuilds not happen.
> 
> 
>   From William Blevins:
>     - Updated D language scanner support to latest: 2.071.1. (PR #1924)
>       https://dlang.org/spec/module.html <https://dlang.org/spec/module.html> accessed 11 August 2016
>       - Enhancements:
>         - Added support for selective imports: "import A : B, C;" -> A
>         - Added support for renamed imports. "import B = A;" -> A
>         - Supports valid combinations: "import A, B, CCC = C, DDD = D : EEE = FFF;" -> A, B, C, D
>       - Notes:
>         - May find new (previously missed) Dlang dependencies.
>         - May cause rebuild after upgrade due to dependency changes.
>     - Updated Fortran-related tests to pass under GCC 5/6.
>     - Fixed SCons.Tool.Packaging.rpm.package source nondeterminism across builds.
> 
>   From William Deegan:
>     - Removed deprecated tools CVS, Perforce, BitKeeper, RCS, SCCS, Subversion.
>     - Removed deprecated module SCons.Sig
>     - Added prioritized list of xsltproc tools to docbook. The order will now be as
>       follows: xsltproc, saxon, saxon-xslt, xalan  (with first being highest priority, first
>       tool found is used)
>     - Fixed MSVSProject example code (http://scons.tigris.org/issues/show_bug.cgi?id=2979 <http://scons.tigris.org/issues/show_bug.cgi?id=2979>)
>     - Defined MS SDK 10.0 and Changed VS 2015 to use SDK 10.0
>     - Changes to Action Function and Action Class signiture creation.  NOTE: This will cause rebuilds
>       for many builds when upgrading to SCons 3.0
>     - Fixed Bug #3027 - "Cross Compiling issue: cannot override ranlib"
>     - Fixed Bug #3020 - "Download link in user guide wrong. python setup.py install --version-lib broken"
>     - Fixed Bug #2486 - Added SetOption('silent',True) - Previously this value was not allowed to be set.
>     - Fixed Bug #3040 - Non-unicode character in CHANGES.txt
>     - Fixed Bug #2622 - AlwaysBuild + MSVC regression.
>     - Fixed Bug #3025 - (Credit to Florian : User flow86 on tigris) - Fix typo JAVACLASSSUFIX should have been
>                         JAVACLASSSUFFIX
> 
> 
>   From Ibrahim Esmat:
>     - Added the capability to build Windows Store Compatible libraries that can be used
>       with Universal Windows Platform (UWP) Apps and published to the store
> 
>   From Daniel Holth:
>     - Add basic support for PyPy (by deleting __slots__ from Node with a
>       metaclass on PyPy); wrap most-used open() calls in 'with' statements to
>       avoid too many open files.
>     - Add __main__.py for `python -m SCons` in case it is on PYTHONPATH.
>     - Always use highest available pickle protocol for efficiency.
>     - Remove unused command line fallback for the zip tool.
> 
>   From Gaurav Juvekar:
>     - Fix issue #2832: Expand construction variables in 'chdir' argument of builders. (PR #463)
>     - Fix issue #2910: Make --tree=all handle Unicode. (PR #427)
>     - Fix issue #2788: Fix typo in documentation example for sconf. (PR #388)
> 
>   From Alexey Klimkin:
>     - Use memoization to optimize PATH evaluation across all dependencies per
>       node. (PR #345)
>     - Use set() where it is applicable (PR #344)
> 
>   From M. Limber:
>     - Fixed msvs.py for Visual Studio Express editions that would report
>       "Error  : ValueError: invalid literal for float(): 10.0Exp".
> 
>   From Rick Lupton:
>     - Update LaTeX scanner to understand \import and related commands
> 
>   From Steve Robinson:
>     - Add support for Visual Studio 2017.  This support requires vswhere.exe a helper
>       tool installed with newer installs of 2017. SCons expects it to be located at
>       "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
>       It can be downloaded separately at     
>       https://github.com/Microsoft/vswhere <https://github.com/Microsoft/vswhere>
> 
>   From Paweł Tomulik:
>     - Fixed the issue with LDMODULEVERSIONFLAGS reported by Tim Jennes
>       (https://pairlist4.pair.net/pipermail/scons-users/2016-May/004893.html <https://pairlist4.pair.net/pipermail/scons-users/2016-May/004893.html>).
>       An error was causing "-Wl,Bsymbolic" being added to linker's command-line
>       even when there was no specified value in LDMODULEVERSION and thus no
>       need for the flags to be specified.
>     - Added LoadableModule to the list of global functions (DefaultEnvironment
>       builders).
> 
>   From Manish Vachharajani:
>     - Update debian rules, compat, and control to not use features
>       deprecated or obsolete in later versions of debhelpers
>     - Update python version to 2.7 in debian/control
> 
>   From Richard Viney:
>     - Fixed PCHPDBFLAGS causing a deprecation warning on MSVC v8 and later when
>       using PCHs and PDBs together.
> 
> 
>   From Richard West:
>     - Added nested / namespace tool support
>     - Added a small fix to the python3 tool loader when loading a tool as a package
>     - Added additional documentation to the user manual on using toolpaths with the environment
>       This includes the use of sys.path to search for tools installed via pip or package managers
>     - Added support for a PyPackageDir function for use with the toolpath
> 
>   From Russel Winder:
>     - Reordered the default D tools from "dmd, gdc, ldc" to "dmd, ldc, gdc".
>     - Add a ProgramAllAtOnce builder to the dmd, ldc, and gdc tools. (PR #448)
>     - Remove a file name exception for very old Fedora LDC installation.
>     - gdc can now handle building shared objects (tested for version 6.3.0).
>     - Remove establishing the SharedLibrary builder in the dmd, ldc, and gdc
>       tools, must now include the ar tool to get this builder as is required for
>       other compiler tools.
>     - Add clang and clang++ tools based on Paweł Tomulik's work.
>  
>   From Tom Tanner:
>     - Allow nested $( ... $) sections
> 
> _______________________________________________
> 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://pairlist2.pair.net/pipermail/scons-dev/attachments/20170822/e3372a4d/attachment.html>


More information about the Scons-dev mailing list