[SCons] Replace from buildutils import *

This commit is contained in:
Ingmar Schoegl
2024-09-02 22:15:47 -05:00
parent 3f7d0ff726
commit 18b6a67e7c
12 changed files with 28 additions and 22 deletions

View File

@@ -91,12 +91,17 @@ from packaging.specifiers import SpecifierSet
from packaging.version import parse as parse_version
import SCons
from buildutils import (Option, PathOption, BoolOption, EnumOption, Configuration,
logger, remove_directory, remove_file, test_results,
add_RegressionTest, get_command_output, listify, which,
ConfigBuilder, multi_glob, quoted, add_system_include,
checkout_submodule, check_for_python, check_sundials,
config_error, run_preprocessor, make_relative_path_absolute)
# ensure that Python and SCons versions are sufficient for the build process
EnsurePythonVersion(3, 7)
EnsureSConsVersion(3, 0, 0)
from buildutils import *
if not COMMAND_LINE_TARGETS:
# Print usage help
logger.error("Missing command argument: type 'scons help' for information.")
@@ -1862,7 +1867,7 @@ cdefine('CT_USE_SYSTEM_YAMLCPP', 'system_yamlcpp')
config_h_build = env.Command('build/src/config.h.build',
'include/cantera/base/config.h.in',
ConfigBuilder(configh))
ConfigBuilder(configh))
# This separate copy operation, which SCons will skip if config.h.build is
# unmodified, prevents unnecessary rebuilds of the precompiled header
config_h = env.Command('include/cantera/base/config.h',

View File

@@ -1,10 +1,10 @@
from collections import namedtuple
from pathlib import Path
import subprocess
from buildutils import *
from SCons import Errors
from buildutils import multi_glob
Import('env', 'build', 'install')
localenv = env.Clone()

View File

@@ -2,7 +2,9 @@
import re
from pathlib import Path
from packaging.version import parse as parse_version
from buildutils import *
from buildutils import (get_command_output, which, multi_glob,
get_pip_install_location, setup_python_env)
Import('env', 'build', 'install')

View File

@@ -1,6 +1,4 @@
import os
from buildutils import *
from buildutils import multi_glob, compiler_flag_list
Import('env', 'build', 'install')
localenv = env.Clone()

View File

@@ -1,5 +1,4 @@
from os.path import join as pjoin, relpath
from buildutils import *
from buildutils import quoted, compiler_flag_list
Import('env', 'install', 'buildSample')
localenv = env.Clone()

View File

@@ -1,8 +1,8 @@
from os.path import join as pjoin
import os
from buildutils import *
from collections import namedtuple
from buildutils import logger, multi_glob, quoted, compiler_flag_list
Import('env', 'build', 'install', 'buildSample')
Sample = namedtuple(

View File

@@ -1,5 +1,4 @@
from os.path import join as pjoin, relpath
from buildutils import *
from buildutils import compiler_flag_list
Import('env', 'install', 'buildSample')
localenv = env.Clone()

View File

@@ -1,5 +1,6 @@
from os.path import join as pjoin, relpath
from buildutils import *
from os.path import join as pjoin
from buildutils import quoted
Import('env', 'install', 'buildSample')
localenv = env.Clone()

View File

@@ -1,7 +1,8 @@
from buildutils import *
from pathlib import Path
import re
from buildutils import (logger, remove_file, multi_glob, get_spawn,
add_system_include, setup_python_env)
Import('env', 'build', 'install', 'libraryTargets')
def defaultSetup(env, subdir, extensions):

View File

@@ -1,4 +1,4 @@
from buildutils import *
from buildutils import multi_glob, get_spawn
Import('env', 'build', 'install')

View File

@@ -5,7 +5,7 @@ from os.path import join as pjoin
import time
import sys
from buildutils import *
from buildutils import logger, test_results, multi_glob
Import('env','build','install')
localenv = env.Clone()

View File

@@ -1,6 +1,7 @@
import os
from os.path import join as pjoin
from buildutils import *
from buildutils import test_results, multi_glob
Import('env','build','install')
localenv = env.Clone()