Description
Describe the bug
(@bdbaddog edit:) I'm going to change this to:
An invalid SConstruct should still output the --help
output. We're not going to change that SCons will process SContruct(s) before outputing --help
output. This is part of SCons's long running functionality. SConstructs can add --xyz
options so before any command line arguments can be processed it's required to process SConstructs.
From initial issue filing:
Following the "Principle of least astonishment" it would make sense that invoking
scons --help
does not try to interpret the SConstruct.py file in the current directory and possibly fails to interpret it if it is not currently valid Python code (i. e. interpretation fails).scons --version
does not seem to parse Python files.
Required information
- Link to SCons Users thread discussing your issue.
bdbaddog asked me to file the issue in the Discord #scons-help channel - Version of SCons
v3.1.2 - Version of Python
N/A - Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc)
N/A - How you installed SCons
Fedora package - What Platform are you on? (Linux/Windows and which version)
Fedora 31 - How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues.
Create an invalid SConstruct file and invokescons --help
- How you invoke scons (The command line you're using "scons --flags some_arguments")
scons --help