Skip to content

Commit

Permalink
Merge pull request #4447 from StenGruener/sconscript_debug_fix
Browse files Browse the repository at this point in the history
Fixing a bug with --debug=sconscript
  • Loading branch information
bdbaddog authored Nov 29, 2023
2 parents 6facdff + 83eaacb commit a998627
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ NOTE: The 4.0.0 Release of SCons dropped Python 2.7 Support
NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported

RELEASE VERSION/DATE TO BE FILLED IN LATER

From Michał Górny:
- Remove unecessary dependencies on pypi packages from setup.cfg

From Sten Grüner:
- Fix of the --debug=sconscript option to return exist statements when using return
statement with stop flag enabled

RELEASE 4.6.0 - Sun, 19 Nov 2023 17:22:20 -0700

Expand Down
3 changes: 2 additions & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
FIXES
-----

- List fixes of outright bugs
- Fix of the --debug=sconscript option to return exist statements when using return
statement with stop flag enabled

IMPROVEMENTS
------------
Expand Down
5 changes: 4 additions & 1 deletion SCons/Script/SConscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ def _SConscript(fs, *files, **kw):
if SCons.Debug.sconscript_trace:
print("scons: Exiting "+str(scriptname))
except SConscriptReturn:
pass
if SCons.Debug.sconscript_trace:
print("scons: Exiting "+str(scriptname))
else:
pass
finally:
if Main.print_time:
elapsed = time.perf_counter() - start_time
Expand Down
12 changes: 12 additions & 0 deletions test/option/debug-sconscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
'scons: Exiting %s%sSConstruct' % (wpath, os.sep)
]
test.must_contain_all_lines(test.stdout(), expect)

# Ensure that reutrns with stop are handled properly

test.write('SConstruct', """\
foo = "bar"
Return("foo", stop=True)
print("SConstruct")
""")

test.run(arguments="--debug=sconscript .")
test.must_contain_all_lines(test.stdout(), expect)

test.pass_test()

# Local Variables:
Expand Down

0 comments on commit a998627

Please sign in to comment.