From f8614aa2d65f2b2484efdaf55a4b8c506157e915 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 14 Sep 2014 22:21:30 -0400 Subject: Support -isystem in ParseFlags The -isystem flag specifies an include directory that is afforded the same special treatment (e.g., suppression of warnings) as the typical system include directories. --- src/engine/SCons/Environment.py | 5 ++++- src/engine/SCons/EnvironmentTests.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 62d6809..5f2c9ff 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -719,6 +719,9 @@ class SubstitutionEnvironment(object): t = ('-isysroot', arg) dict['CCFLAGS'].append(t) dict['LINKFLAGS'].append(t) + elif append_next_arg_to == '-isystem': + t = ('-isystem', arg) + dict['CCFLAGS'].append(t) elif append_next_arg_to == '-arch': t = ('-arch', arg) dict['CCFLAGS'].append(t) @@ -791,7 +794,7 @@ class SubstitutionEnvironment(object): elif arg[0] == '+': dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) - elif arg in ['-include', '-isysroot', '-arch']: + elif arg in ['-include', '-isysroot', '-isystem', '-arch']: append_next_arg_to = arg else: dict['CCFLAGS'].append(arg) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index b9ef3f2..a0869e8 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -805,7 +805,9 @@ sys.exit(0) "-pthread " + \ "-fopenmp " + \ "-mno-cygwin -mwindows " + \ - "-arch i386 -isysroot /tmp +DD64 " + \ + "-arch i386 -isysroot /tmp " + \ + "-isystem /usr/include/foo " + \ + "+DD64 " + \ "-DFOO -DBAR=value -D BAZ " d = env.ParseFlags(s) @@ -815,6 +817,7 @@ sys.exit(0) assert d['CCFLAGS'] == ['-X', '-Wa,-as', '-pthread', '-fopenmp', '-mno-cygwin', ('-arch', 'i386'), ('-isysroot', '/tmp'), + ('-isystem', '/usr/include/foo'), '+DD64'], repr(d['CCFLAGS']) assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS']) assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES'] @@ -2051,7 +2054,9 @@ def generate(env): "-F fwd3 " + \ "-pthread " + \ "-mno-cygwin -mwindows " + \ - "-arch i386 -isysroot /tmp +DD64 " + \ + "-arch i386 -isysroot /tmp " + \ + "-isystem /usr/include/foo " + \ + "+DD64 " + \ "-DFOO -DBAR=value") env.ParseConfig("fake $COMMAND") assert save_command == ['fake command'], save_command @@ -2059,6 +2064,7 @@ def generate(env): assert env['CCFLAGS'] == ['', '-X', '-Wa,-as', '-pthread', '-mno-cygwin', ('-arch', 'i386'), ('-isysroot', '/tmp'), + ('-isystem', '/usr/include/foo'), '+DD64'], env['CCFLAGS'] assert env['CPPDEFINES'] == ['FOO', ['BAR', 'value']], env['CPPDEFINES'] assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS'] -- cgit v0.12 From 2a2bb65ba5daa067950ea2be8b13ee812db47241 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Sat, 27 Sep 2014 18:23:41 +0200 Subject: - fix for issue #2971 (Interactive build doesn't work anymore) --- src/CHANGES.txt | 6 +-- src/engine/SCons/Script/Main.py | 9 +++- test/Interactive/configure.py | 106 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 test/Interactive/configure.py diff --git a/src/CHANGES.txt b/src/CHANGES.txt index d516131..58071ab 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,9 +6,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - From John Doe: - - - Whatever John Doe did. + From Bernhard Walle and Dirk Baechle: + - Fixed the interactive mode, in connection with + Configure contexts (#2971). RELEASE 2.3.3 - Sun, 24 Aug 2014 21:08:33 -0400 diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 439b869..c7a9d27 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -953,6 +953,14 @@ def _main(parser): if options.include_dir: sys.path = options.include_dir + sys.path + # If we're about to start SCons in the interactive mode, + # inform the FS about this right here. Else, the release_target_info + # method could get called on some nodes, like the used "gcc" compiler, + # when using the Configure methods within the SConscripts. + # This would then cause subtle bugs, as already happened in #2971. + if options.interactive: + SCons.Node.interactive = True + # That should cover (most of) the options. Next, set up the variables # that hold command-line arguments, so the SConscript files that we # read and execute have access to them. @@ -1082,7 +1090,6 @@ def _main(parser): platform = SCons.Platform.platform_module() if options.interactive: - SCons.Node.interactive = True SCons.Script.Interactive.interact(fs, OptionsParser, options, targets, target_top) diff --git a/test/Interactive/configure.py b/test/Interactive/configure.py new file mode 100644 index 0000000..ceb1aea --- /dev/null +++ b/test/Interactive/configure.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify basic operation of the --interactive command line option to build +a target, while using a Configure context within the environment. + +Also tests that "b" can be used as a synonym for "build". +""" + +import TestSCons + +test = TestSCons.TestSCons() + +test.write('SConstruct', """\ +import sys + +env = Environment() + +conf = Configure(env) +if not conf.CheckCXX(): + sys.exit(1) +conf.Finish() + +env.Program('foo','foo.cpp') +""") + +test.write('foo.cpp', """\ +#include + +int main (int argc, char *argv[]) +{ + printf("Hello, World!"); + return 0; +} +""") + + +scons = test.start(arguments = '-Q --interactive') +# Initial build +scons.send("build foo\n") + +test.wait_for(test.workpath('foo')) +# Update without any changes -> no action +scons.send("build foo\n") +# Changing the source file +test.write('foo.cpp', """\ +#include + +void foo() +{ + ; +} + +int main (int argc, char *argv[]) +{ + printf("Hello, World!"); + return 0; +} +""") + +# Verify that "b" can be used as a synonym for the "build" command. +scons.send("b foo\n") + +scons.send("build foo\n") + +expect_stdout = r"""scons>>> .*foo\.cpp.* +.*foo.* +scons>>> .*foo\.cpp.* +.*foo.* +scons>>> scons: `foo' is up to date. +scons>>> scons: `foo' is up to date. +scons>>>\s* +""" + +test.finish(scons, stdout = expect_stdout, match=TestSCons.match_re) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12 From 0b806ea5b203f1ef876f5d91294aaeabdc5a639a Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Fri, 26 Sep 2014 16:17:38 +0300 Subject: Split __VERSION__ string in EnsureSConsVersion to avoid replacement during package build process. This fixes SCons warning that it runs in development mode. --- src/CHANGES.txt | 5 +++++ src/engine/SCons/Script/SConscript.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 58071ab..4fc89b6 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -11,6 +11,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER Configure contexts (#2971). +RELEASE 2.3.4 - Sss, DD Mmm yyyy hh:mm:ss -zzzz + + From Anatoly Techtonik: + - Fix EnsureSConsVersion warning when running packaged version + RELEASE 2.3.3 - Sun, 24 Aug 2014 21:08:33 -0400 From Roland Stark: diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 111d091..f4a7f07 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -461,7 +461,8 @@ class SConsEnvironment(SCons.Environment.Base): def EnsureSConsVersion(self, major, minor, revision=0): """Exit abnormally if the SCons version is not late enough.""" - if SCons.__version__ == '__VERSION__': + # split string to avoid replacement during build process + if SCons.__version__ == '__' + 'VERSION__': SCons.Warnings.warn(SCons.Warnings.DevelopmentVersionWarning, "EnsureSConsVersion is ignored for development version") return -- cgit v0.12 From 2db53c86a769e77f7f15db67992ae240bebd86cd Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sat, 27 Sep 2014 09:25:42 -0400 Subject: Fix change log from prev commit. --- src/CHANGES.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4fc89b6..7f7b4ab 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -10,9 +10,6 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Fixed the interactive mode, in connection with Configure contexts (#2971). - -RELEASE 2.3.4 - Sss, DD Mmm yyyy hh:mm:ss -zzzz - From Anatoly Techtonik: - Fix EnsureSConsVersion warning when running packaged version -- cgit v0.12 From 5832ea4637bd1ab86b385fffffb482467509a7e6 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sat, 27 Sep 2014 09:51:17 -0400 Subject: Updated CHANGES.txt: recent D tool fixes --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 7f7b4ab..4207390 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -13,6 +13,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From Anatoly Techtonik: - Fix EnsureSConsVersion warning when running packaged version + From Russel Winder: + - Fix D tools for building shared libraries + RELEASE 2.3.3 - Sun, 24 Aug 2014 21:08:33 -0400 From Roland Stark: -- cgit v0.12 From c75d5a163567c2e8e16e24dd73c90b6ee75fc03c Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sat, 27 Sep 2014 10:22:16 -0400 Subject: Release fixes: README.rst python version, and some auto version numbering. --- README.rst | 26 +++++++++++++------------- src/Announce.txt | 5 +++++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 56c48e2..f80afd7 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ version at the SCons download page: Execution Requirements ====================== -Running SCons requires Python version 2.4 or later (Python 3 is not +Running SCons requires Python version 2.6 or later (Python 3 is not yet supported). There should be no other dependencies or requirements to run SCons. @@ -156,7 +156,7 @@ Or on Windows:: By default, the above commands will do the following: -- Install the version-numbered "scons-2.0.0" and "sconsign-2.0.0" scripts in +- Install the version-numbered "scons-2.3.3" and "sconsign-2.3.3" scripts in the default system script directory (/usr/bin or C:\\Python\*\\Scripts, for example). This can be disabled by specifying the "--no-version-script" option on the command line. @@ -168,23 +168,23 @@ By default, the above commands will do the following: before making it the default on your system. On UNIX or Linux systems, you can have the "scons" and "sconsign" scripts be - hard links or symbolic links to the "scons-2.0.0" and "sconsign-2.0.0" + hard links or symbolic links to the "scons-2.3.3" and "sconsign-2.3.3" scripts by specifying the "--hardlink-scons" or "--symlink-scons" options on the command line. -- Install "scons-2.0.0.bat" and "scons.bat" wrapper scripts in the Python +- Install "scons-2.3.3.bat" and "scons.bat" wrapper scripts in the Python prefix directory on Windows (C:\\Python\*, for example). This can be disabled by specifying the "--no-install-bat" option on the command line. On UNIX or Linux systems, the "--install-bat" option may be specified to - have "scons-2.0.0.bat" and "scons.bat" files installed in the default system + have "scons-2.3.3.bat" and "scons.bat" files installed in the default system script directory, which is useful if you want to install SCons in a shared file system directory that can be used to execute SCons from both UNIX/Linux and Windows systems. - Install the SCons build engine (a Python module) in an appropriate - version-numbered SCons library directory (/usr/lib/scons-2.0.0 or - C:\\Python\*\\scons-2.0.0, for example). See below for more options related to + version-numbered SCons library directory (/usr/lib/scons-2.3.3 or + C:\\Python\*\\scons-2.3.3, for example). See below for more options related to installing the build engine library. - Install the troff-format man pages in an appropriate directory on UNIX or @@ -462,13 +462,13 @@ running all of "runtest.py -a". Building Packages ================= -We use SCons (version 0.96.93 later) to build its own packages. If you +We use SCons (version 2.3.3 or later) to build its own packages. If you already have an appropriate version of SCons installed on your system, you can build everything by simply running it:: $ scons -If you don't have SCons version 0.96.93 later already installed on your +If you don't have SCons already installed on your system, you can use the supplied bootstrap.py script (see the section above about `Executing SCons Without Installing`_):: @@ -477,9 +477,9 @@ about `Executing SCons Without Installing`_):: Depending on the utilities installed on your system, any or all of the following packages will be built:: - build/dist/scons-2.0.0-1.noarch.rpm - build/dist/scons-2.0.0-1.src.rpm - build/dist/scons-2.0.0.linux-i686.tar.gz + build/dist/scons-2.3.3-1.noarch.rpm + build/dist/scons-2.3.3-1.src.rpm + build/dist/scons-2.3.3.linux-i686.tar.gz build/dist/scons-2.3.3.tar.gz build/dist/scons-2.3.3.win32.exe build/dist/scons-2.3.3.zip @@ -488,7 +488,7 @@ following packages will be built:: build/dist/scons-local-2.3.3.zip build/dist/scons-src-2.3.3.tar.gz build/dist/scons-src-2.3.3.zip - build/dist/scons_1.3.0-1_all.deb + build/dist/scons_2.3.3-1_all.deb The SConstruct file is supposed to be smart enough to avoid trying to build packages for which you don't have the proper utilities installed. For diff --git a/src/Announce.txt b/src/Announce.txt index 9ca047d..6cb69b3 100644 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -26,6 +26,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER since last release. This announcement highlights only the important changes. + Please note the following important changes since release 2.3.3: + + -- Fix for EnsureSConsVersion regression in 2.3.3. + -- Fix for interactive mode with Configure contexts + Please note the following important changes since release 2.3.2: -- On Windows, .def files did not work as sources to shared -- cgit v0.12 From fc66ae179da0e407b43f572f45d8656ba6b42a78 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sat, 27 Sep 2014 10:17:02 -0400 Subject: Update CHANGES, Release and Announce prior to 2.3.4 release. --- debian/changelog | 6 +++++ src/Announce.txt | 1 + src/RELEASE.txt | 68 ++++++-------------------------------------------------- 3 files changed, 14 insertions(+), 61 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5e4bf60..a39a73b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +scons (2.3.4) unstable; urgency=low + + * Maintenance release. + + -- Gary Oberbrunner Sun, 27 Sep 2014 21:00:00 -0500 + scons (2.3.3) unstable; urgency=low * Maintenance release. diff --git a/src/Announce.txt b/src/Announce.txt index 6cb69b3..7c6fdd5 100644 --- a/src/Announce.txt +++ b/src/Announce.txt @@ -29,6 +29,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER Please note the following important changes since release 2.3.3: -- Fix for EnsureSConsVersion regression in 2.3.3. + -- Fix for interactive mode with Configure contexts Please note the following important changes since release 2.3.2: diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 31c9590..853456d 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -1,73 +1,19 @@ - A new SCons checkpoint release, 2.3.4.alpha.yyyymmdd, is now available + A new SCons checkpoint release, 2.3.4, is now available on the SCons download page: http://www.scons.org/download.php - XXX The primary purpose of this release ... XXX + This is a bug fix release to fix a regression in EnsureSConsVersion. - A SCons "checkpoint release" is intended to provide early access to - new features so they can be tested in the field before being released - for adoption by other software distributions. - - Note that a checkpoint release is developed using the same test-driven - development methodology as all SCons releases. Existing SCons - functionality should all work as it does in previous releases (except - for any changes identified in the release notes) and early adopters - should be able to use a checkpoint release safely for production work - with existing SConscript files. If not, it represents not only a bug - in SCons but also a hole in the regression test suite, and we want to - hear about it. - - New features may be more lightly tested than in past releases, - especially as concerns their interaction with all of the other - functionality in SCons. We are especially interested in hearing bug - reports about new functionality. - - We do not recommend that downstream distributions (Debian, Fedora, - etc.) package a checkpoint release, mainly to avoid confusing the - "public" release numbering with the long checkpoint release names. - - Here is a summary of the changes since 1.3.0: - - NEW FUNCTIONALITY - - - List new features (presumably why a checkpoint is being released) - - DEPRECATED FUNCTIONALITY - - - List anything that's been deprecated since the last release - - CHANGED/ENHANCED EXISTING FUNCTIONALITY - - - List modifications to existing features, where the previous behavior - wouldn't actually be considered a bug + Here is a summary of the changes since 2.3.3 FIXES - - List fixes of outright bugs - - IMPROVEMENTS - - - List improvements that wouldn't be visible to the user in the - documentation: performance improvements (describe the circumstances - under which they would be observed), or major code cleanups - - PACKAGING - - - List changes in the way SCons is packaged and/or released - - DOCUMENTATION - - - List any significant changes to the documentation (not individual - typo fixes, even if they're mentioned in src/CHANGES.txt to give - the contributor credit) - - DEVELOPMENT - - - List visible changes in the way SCons is developed + - Fix regression in EnsureSConsVersion - Thanks to CURLY, LARRY, and MOE for their contributions to this release. - Contributors are listed alphabetically by their last name. + Thanks to Anatoly Techtonik and Russel Winder for their + contributions to this release. Contributors are listed + alphabetically by their last name. __COPYRIGHT__ __FILE__ __REVISION__ __DATE__ __DEVELOPER__ -- cgit v0.12 From 03a83a3d4cb16181642bd85b72d70f26d79ee290 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sat, 27 Sep 2014 15:56:46 -0400 Subject: Put default branch back to develop mode, post 2.3.4. --- QMTest/TestSCons.py | 2 +- README.rst | 16 ++++++------- ReleaseConfig | 2 +- SConstruct | 4 ++-- src/CHANGES.txt | 7 ++++++ src/RELEASE.txt | 68 +++++++++++++++++++++++++++++++++++++++++++++++------ 6 files changed, 80 insertions(+), 19 deletions(-) diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index 3c94dcd..8635f8e 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -34,7 +34,7 @@ from TestCmd import PIPE # here provides some independent verification that what we packaged # conforms to what we expect. -default_version = '2.3.3' +default_version = '2.3.4' python_version_unsupported = (2, 3, 0) python_version_deprecated = (2, 7, 0) diff --git a/README.rst b/README.rst index f80afd7..599abaf 100644 --- a/README.rst +++ b/README.rst @@ -480,14 +480,14 @@ following packages will be built:: build/dist/scons-2.3.3-1.noarch.rpm build/dist/scons-2.3.3-1.src.rpm build/dist/scons-2.3.3.linux-i686.tar.gz - build/dist/scons-2.3.3.tar.gz - build/dist/scons-2.3.3.win32.exe - build/dist/scons-2.3.3.zip - build/dist/scons-doc-2.3.3.tar.gz - build/dist/scons-local-2.3.3.tar.gz - build/dist/scons-local-2.3.3.zip - build/dist/scons-src-2.3.3.tar.gz - build/dist/scons-src-2.3.3.zip + build/dist/scons-2.3.4.tar.gz + build/dist/scons-2.3.4.win32.exe + build/dist/scons-2.3.4.zip + build/dist/scons-doc-2.3.4.tar.gz + build/dist/scons-local-2.3.4.tar.gz + build/dist/scons-local-2.3.4.zip + build/dist/scons-src-2.3.4.tar.gz + build/dist/scons-src-2.3.4.zip build/dist/scons_2.3.3-1_all.deb The SConstruct file is supposed to be smart enough to avoid trying to build diff --git a/ReleaseConfig b/ReleaseConfig index 9d06967..0735012 100644 --- a/ReleaseConfig +++ b/ReleaseConfig @@ -32,7 +32,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" # 'final', the patchlevel is set to the release date. This value is # mandatory and must be present in this file. #version_tuple = (2, 2, 0, 'final', 0) -version_tuple = (2, 3, 4, 'alpha', 0) +version_tuple = (2, 3, 5, 'alpha', 0) # Python versions prior to unsupported_python_version cause a fatal error # when that version is used. Python versions prior to deprecate_python_version diff --git a/SConstruct b/SConstruct index d07c6cf..27b07f2 100644 --- a/SConstruct +++ b/SConstruct @@ -6,7 +6,7 @@ copyright_years = '2001 - 2014' # This gets inserted into the man pages to reflect the month of release. -month_year = 'August 2014' +month_year = 'September 2014' # # __COPYRIGHT__ @@ -43,7 +43,7 @@ import tempfile import bootstrap project = 'scons' -default_version = '2.3.3' +default_version = '2.3.4' copyright = "Copyright (c) %s The SCons Foundation" % copyright_years platform = distutils.util.get_platform() diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4207390..1798e36 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,13 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From John Doe: + + - Whatever John Doe did. + + +RELEASE 2.3.4 - Mon, 27 Sep 2014 12:50:35 -0400 + From Bernhard Walle and Dirk Baechle: - Fixed the interactive mode, in connection with Configure contexts (#2971). diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 853456d..1fa033b 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -1,19 +1,73 @@ - A new SCons checkpoint release, 2.3.4, is now available + A new SCons checkpoint release, 2.3.5.alpha.yyyymmdd, is now available on the SCons download page: http://www.scons.org/download.php - This is a bug fix release to fix a regression in EnsureSConsVersion. + XXX The primary purpose of this release ... XXX - Here is a summary of the changes since 2.3.3 + A SCons "checkpoint release" is intended to provide early access to + new features so they can be tested in the field before being released + for adoption by other software distributions. + + Note that a checkpoint release is developed using the same test-driven + development methodology as all SCons releases. Existing SCons + functionality should all work as it does in previous releases (except + for any changes identified in the release notes) and early adopters + should be able to use a checkpoint release safely for production work + with existing SConscript files. If not, it represents not only a bug + in SCons but also a hole in the regression test suite, and we want to + hear about it. + + New features may be more lightly tested than in past releases, + especially as concerns their interaction with all of the other + functionality in SCons. We are especially interested in hearing bug + reports about new functionality. + + We do not recommend that downstream distributions (Debian, Fedora, + etc.) package a checkpoint release, mainly to avoid confusing the + "public" release numbering with the long checkpoint release names. + + Here is a summary of the changes since 1.3.0: + + NEW FUNCTIONALITY + + - List new features (presumably why a checkpoint is being released) + + DEPRECATED FUNCTIONALITY + + - List anything that's been deprecated since the last release + + CHANGED/ENHANCED EXISTING FUNCTIONALITY + + - List modifications to existing features, where the previous behavior + wouldn't actually be considered a bug FIXES - - Fix regression in EnsureSConsVersion + - List fixes of outright bugs + + IMPROVEMENTS + + - List improvements that wouldn't be visible to the user in the + documentation: performance improvements (describe the circumstances + under which they would be observed), or major code cleanups + + PACKAGING + + - List changes in the way SCons is packaged and/or released + + DOCUMENTATION + + - List any significant changes to the documentation (not individual + typo fixes, even if they're mentioned in src/CHANGES.txt to give + the contributor credit) + + DEVELOPMENT + + - List visible changes in the way SCons is developed - Thanks to Anatoly Techtonik and Russel Winder for their - contributions to this release. Contributors are listed - alphabetically by their last name. + Thanks to CURLY, LARRY, and MOE for their contributions to this release. + Contributors are listed alphabetically by their last name. __COPYRIGHT__ __FILE__ __REVISION__ __DATE__ __DEVELOPER__ -- cgit v0.12 From e702acbc201264b28825b600f41c2c351149680a Mon Sep 17 00:00:00 2001 From: Dan Pidcock Date: Wed, 15 Oct 2014 12:52:31 +0100 Subject: Support toolset in VS project files so that displayed version of visual studio matches the one that will be used --- src/engine/SCons/Tool/msvs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 06ce486..2b2ea13 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -892,6 +892,7 @@ V10DSPPropertyGroupCondition = """\ \t \t\tMakefile \t\tfalse +\t\t%(toolset)s \t """ @@ -972,6 +973,11 @@ class _GenerateV10DSP(_DSPGenerator): self.file.write('\t\n') + toolset = '' + if 'MSVC_VERSION' in self.env: + version_num, suite = msvs_parse_version(self.env['MSVC_VERSION']) + print version_num + toolset = 'v%d' % (version_num * 10) for kind in confkeys: variant = self.configs[kind].variant platform = self.configs[kind].platform -- cgit v0.12 From c11c5c59c13727c429df1941a5c9574617e1546f Mon Sep 17 00:00:00 2001 From: Dan Pidcock Date: Wed, 15 Oct 2014 14:43:38 +0100 Subject: Issue 2978: Update tests for toolset support in VS project files --- QMTest/TestSConsMSVS.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QMTest/TestSConsMSVS.py b/QMTest/TestSConsMSVS.py index c78b452..540d24d 100644 --- a/QMTest/TestSConsMSVS.py +++ b/QMTest/TestSConsMSVS.py @@ -709,6 +709,7 @@ expected_vcprojfile_10_0 = """\ \t \t\tMakefile \t\tfalse +\t\tv100 \t \t \t @@ -773,6 +774,7 @@ expected_vcprojfile_11_0 = """\ \t \t\tMakefile \t\tfalse +\t\tv110 \t \t \t -- cgit v0.12 From 6333b00c9c8baa442154291c9beb29f958066b3c Mon Sep 17 00:00:00 2001 From: Dan Pidcock Date: Mon, 20 Oct 2014 10:10:47 +0100 Subject: Issue 2978: remove debug line --- src/engine/SCons/Tool/msvs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 2b2ea13..c9f1f2a 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -976,7 +976,6 @@ class _GenerateV10DSP(_DSPGenerator): toolset = '' if 'MSVC_VERSION' in self.env: version_num, suite = msvs_parse_version(self.env['MSVC_VERSION']) - print version_num toolset = 'v%d' % (version_num * 10) for kind in confkeys: variant = self.configs[kind].variant -- cgit v0.12 From 9866a7f445bb30e8cb16cc1f9c0225dfc1061ff5 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Wed, 22 Oct 2014 12:25:22 +0200 Subject: updated CHANGES.txt --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 8c02e14..1372baf 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -6,6 +6,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER + From Dan Pidcock: + - Added support for the 'PlatformToolset' tag in VS project files (#2978). + From James McCoy: - Added support for '-isystem' to ParseFlags. -- cgit v0.12 From 8daa5b033c4d7447a36b3f1fb1a119dd8f72b381 Mon Sep 17 00:00:00 2001 From: MorpheusDev Date: Mon, 27 Oct 2014 16:33:16 +0100 Subject: Multiple 'cmdargs' feature added to allow a per variant cmdargs, to be able to insert different parameters between Debug and Release. --- src/engine/SCons/Tool/msvs.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index c9f1f2a..f54e552 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -289,9 +289,17 @@ class _DSPGenerator(object): runfile.append(s) self.sconscript = env['MSVSSCONSCRIPT'] - - cmdargs = env.get('cmdargs', '') - + + if 'cmdargs' not in env or env['cmdargs'] == None: + cmdargs = [''] * len(variants) + elif SCons.Util.is_String(env['cmdargs']): + outdir = [env['cmdargs']] * len(variants) + elif SCons.Util.is_List(env['cmdargs']): + if len(env['cmdargs']) != len(variants): + raise SCons.Errors.InternalError("Sizes of 'cmdargs' and 'variant' lists must be the same.") + else: + cmdargs = env['cmdargs'] + self.env = env if 'name' in self.env: @@ -354,7 +362,7 @@ class _DSPGenerator(object): print "Adding '" + self.name + ' - ' + config.variant + '|' + config.platform + "' to '" + str(dspfile) + "'" for i in range(len(variants)): - AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs) + AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs[i]) self.platforms = [] for key in self.configs.keys(): -- cgit v0.12 From 9ebcb17af2a0cc42e44a35113e345e1eb9e21fb5 Mon Sep 17 00:00:00 2001 From: Laurent Marchelli Date: Wed, 5 Nov 2014 10:19:30 +0100 Subject: Dumb error fixed. --- src/engine/SCons/Tool/msvs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index f54e552..cb4ca55 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -293,7 +293,7 @@ class _DSPGenerator(object): if 'cmdargs' not in env or env['cmdargs'] == None: cmdargs = [''] * len(variants) elif SCons.Util.is_String(env['cmdargs']): - outdir = [env['cmdargs']] * len(variants) + cmdargs = [env['cmdargs']] * len(variants) elif SCons.Util.is_List(env['cmdargs']): if len(env['cmdargs']) != len(variants): raise SCons.Errors.InternalError("Sizes of 'cmdargs' and 'variant' lists must be the same.") -- cgit v0.12 From 2d510c98fe10cbdc8328da7baea83b2ea74c0788 Mon Sep 17 00:00:00 2001 From: MorpheusDev Date: Fri, 7 Nov 2014 16:54:35 +0100 Subject: Unary tests ready for review. --- src/engine/SCons/Tool/msvsTests.py | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py index 2f4f302..261dbcc 100644 --- a/src/engine/SCons/Tool/msvsTests.py +++ b/src/engine/SCons/Tool/msvsTests.py @@ -40,6 +40,7 @@ from SCons.Tool.MSCommon.common import debug from SCons.Tool.MSCommon import get_default_version, \ query_versions +from SCons.Tool.msvs import _GenerateV6DSP, _GenerateV7DSP, _GenerateV10DSP regdata_6a = r'''[HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio] [HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\6.0] @@ -591,6 +592,84 @@ class msvsTestCase(unittest.TestCase): assert not v1 or str(v1[0]) == self.highest_version, \ (v1, self.highest_version) assert len(v1) == self.number_of_versions, v1 + + def test_config_generation(self): + """Test _DSPGenerator.__init__(...)""" + if not self.highest_version : + return + + # Initialize 'static' variables + version_num, suite = msvs_parse_version(self.highest_version) + if version_num >= 10.0: + function_test = _GenerateV10DSP + elif version_num >= 7.0: + function_test = _GenerateV7DSP + else: + function_test = _GenerateV6DSP + + str_function_test = str(function_test.__init__) + dspfile = 'test.dsp' + source = 'test.cpp' + + # Create the cmdargs test list + list_variant = ['Debug|Win32','Release|Win32', + 'Debug|x64', 'Release|x64'] + list_cmdargs = ['debug=True target_arch=32', + 'debug=False target_arch=32', + 'debug=True target_arch=x64', + 'debug=False target_arch=x64'] + + # Tuple list : (parameter, dictionary of expected result per variant) + tests_cmdargs = [(None, dict.fromkeys(list_variant, '')), + ('', dict.fromkeys(list_variant, '')), + (list_cmdargs[0], dict.fromkeys(list_variant, list_cmdargs[0])), + (list_cmdargs, dict(zip(list_variant, list_cmdargs)))] + + # Run the test for each test case + for param_cmdargs, expected_cmdargs in tests_cmdargs: + debug('Testing %s. with :\n variant = %s \n cmdargs = "%s"' % \ + (str_function_test, list_variant, param_cmdargs)) + param_configs = [] + expected_configs = {} + for platform in ['Win32', 'x64']: + for variant in ['Debug', 'Release']: + variant_platform = '%s|%s' % (variant, platform) + runfile = '%s\\%s\\test.exe' % (platform, variant) + buildtarget = '%s\\%s\\test.exe' % (platform, variant) + outdir = '%s\\%s' % (platform, variant) + + # Create parameter list for this variant_platform + param_configs.append([variant_platform, runfile, buildtarget, outdir]) + + # Create expected dictionary result for this variant_platform + expected_configs[variant_platform] = \ + {'variant': variant, 'platform': platform, + 'runfile': runfile, + 'buildtarget': buildtarget, + 'outdir': outdir, + 'cmdargs': expected_cmdargs[variant_platform]} + + # Create parameter environment with final parameter dictionary + param_dict = dict(zip(('variant', 'runfile', 'buildtarget', 'outdir'), + [list(l) for l in zip(*param_configs)])) + param_dict['cmdargs'] = param_cmdargs + + # Hack to be able to run the test with a 'DummyEnv' + class _DummyEnv(DummyEnv): + def subst(self, string) : + return string + + env = _DummyEnv(param_dict) + env['MSVSSCONSCRIPT'] = '' + env['MSVS_VERSION'] = self.highest_version + + # Call function to test + genDSP = function_test(dspfile, source, env) + + # Check expected result + self.assertListEqual(genDSP.configs.keys(), expected_configs.keys()) + for key in genDSP.configs.keys(): + self.assertDictEqual(genDSP.configs[key].__dict__, expected_configs[key]) class msvs6aTestCase(msvsTestCase): """Test MSVS 6 Registry""" -- cgit v0.12