Skip to content

Commit

Permalink
[SCons] Minor formatting and docstring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Nov 20, 2021
1 parent c67abd4 commit b88ee87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
7 changes: 3 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ if not COMMAND_LINE_TARGETS:
sys.exit(1)

if parse_version(SCons.__version__) < parse_version("3.0.0"):
logger.error("Cantera requires SCons with a minimum version of 3.0.0. Exiting.",
print_level=False)
logger.error("Cantera requires SCons with a minimum version of 3.0.0. Exiting.")
sys.exit(1)

if os.name not in ["nt", "posix"]:
Expand Down Expand Up @@ -268,8 +267,8 @@ config_options = [
"""Path to the MATLAB install directory. This should be the directory
containing the 'extern', 'bin', etc. subdirectories. Typical values
are: "C:\\Program Files\\MATLAB\\R2021a" on Windows,
"/Applications/MATLAB_R2011a.app" on macOS, or
"/opt/MATLAB/R2011a" on Linux.""",
"/Applications/MATLAB_R2021a.app" on macOS, or
"/opt/MATLAB/R2021a" on Linux.""",
"", PathVariable.PathAccept),
EnumOption(
"f90_interface",
Expand Down
15 changes: 12 additions & 3 deletions site_scons/buildutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@


class Option:
"""Object corresponding to SCons configuration option"""
"""Object corresponding to SCons configuration option.
The purpose of this class is to collect system-dependent default parameters for
SCons configuration options, which are made available to both help text and
reST documentation. The class works in conjunction with the `Configuration` class
to select and convert system-dependent parameters to SCons configuration options.
"""

def __init__(self,
name: str,
Expand Down Expand Up @@ -281,8 +287,11 @@ def to_scons(self, env: "Optional[SCEnvironment]" = None) -> "SCVariables":

class Configuration:
"""
Class enabling selection of options based on attribute dictionary entries that
allow for differentiation between platform/compiler dependent options.
Class enabling selection of options based on a dictionary of `Option` objects
that allows for a differentiation between platform/compiler dependent options.
In addition, the class facilitiates the generation of formatted help text and
reST documentation.
"""

header = [
Expand Down

0 comments on commit b88ee87

Please sign in to comment.