diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-06 08:56:00 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-06 08:56:00 +0200 |
commit | e541f05c62944d8604cf44fecceb2006e2c2383e (patch) | |
tree | 8571c145c34e7a02eecd763a927087186c4cef0d /methods.py | |
parent | c2c9a582da8221eea5292620c74f96322899f0cb (diff) | |
parent | 340f62d1ec491974d1f487646c1b2d5d9ae5e224 (diff) |
Merge pull request #66569 from akien-mga/dotnet-generate-sdkpackageversions
.NET: Generate SdkPackageVersions.props from version.py
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/methods.py b/methods.py index 3a2dd07964..f4afead9f4 100644 --- a/methods.py +++ b/methods.py @@ -7,15 +7,6 @@ from collections import OrderedDict from collections.abc import Mapping from typing import Iterator -# We need to define our own `Action` method to control the verbosity of output -# and whenever we need to run those commands in a subprocess on some platforms. -from SCons import Node -from SCons.Script import Action -from SCons.Script import ARGUMENTS -from SCons.Script import Glob -from SCons.Variables.BoolVariable import _text2bool -from platform_methods import run_in_subprocess - def add_source_files(self, sources, files): # Convert string to list of absolute paths (including expanding wildcard) @@ -220,6 +211,9 @@ def get_cmdline_bool(option, default): """We use `ARGUMENTS.get()` to check if options were manually overridden on the command line, and SCons' _text2bool helper to convert them to booleans, otherwise they're handled as strings. """ + from SCons.Script import ARGUMENTS + from SCons.Variables.BoolVariable import _text2bool + cmdline_val = ARGUMENTS.get(option) if cmdline_val is not None: return _text2bool(cmdline_val) @@ -703,6 +697,9 @@ def generate_cpp_hint_file(filename): def glob_recursive(pattern, node="."): + from SCons import Node + from SCons.Script import Glob + results = [] for f in Glob(str(node) + "/*", source=True): if type(f) is Node.FS.Dir: @@ -913,6 +910,9 @@ def CommandNoCache(env, target, sources, command, **args): def Run(env, function, short_message, subprocess=True): + from SCons.Script import Action + from platform_methods import run_in_subprocess + output_print = short_message if not env["verbose"] else "" if not subprocess: return Action(function, output_print) |