Limit exported functions from buildutils

Each SConscript module imports what it needs from the stdlib.
This commit is contained in:
Bryan Weber
2021-04-15 11:52:16 -04:00
committed by Ray Speth
parent d1eacf7b40
commit edf5e4cc77
11 changed files with 37 additions and 21 deletions

View File

@@ -47,6 +47,16 @@ Cantera must be built using Python 3.6 or higher. You can invoke SCons by execut
followed by any desired options.
"""
from pathlib import Path
import sys
import os
import platform
import subprocess
import re
import textwrap
from os.path import join as pjoin
from pkg_resources import parse_version
import SCons
from buildutils import *
if not COMMAND_LINE_TARGETS:

View File

@@ -1,11 +1,13 @@
from __future__ import print_function
from collections import namedtuple
from os.path import join as pjoin
import os
from buildutils import *
Import('env', 'build', 'install')
localenv = env.Clone()
from collections import namedtuple
Page = namedtuple('Page', ['name', 'title', 'objects'])

View File

@@ -1,4 +1,8 @@
"""Cython-based Python Module"""
import re
from os.path import join as pjoin
from os.path import normpath
from pkg_resources import parse_version
from buildutils import *
Import('env', 'build', 'install')

View File

@@ -1,4 +1,5 @@
"""Minimal Python Module"""
from os.path import join as pjoin
from buildutils import *
Import('env', 'build', 'install')

View File

@@ -1,3 +1,5 @@
from os.path import join as pjoin
import os
from buildutils import *
Import('env', 'build', 'install', 'buildSample')
@@ -31,6 +33,7 @@ set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS})
else:
localenv['cmake_extra'] = ''
# TODO: Accelerate is only used if other BLAS/LAPACK are not used
if env["OS"] == "Darwin":
localenv["cmake_extra"] += "find_library(ACCELERATE_FRAMEWORK Accelerate)"

View File

@@ -1,3 +1,4 @@
from os.path import join as pjoin
from buildutils import *
Import('env', 'install', 'buildSample')

View File

@@ -1,3 +1,4 @@
from os.path import join as pjoin
from buildutils import *
Import('env', 'install', 'buildSample')

View File

@@ -1,6 +1,4 @@
import os
from os.path import join as pjoin
from os.path import normpath
import sys
import platform
import textwrap
@@ -8,31 +6,20 @@ import re
import subprocess
import difflib
import time
import types
import shutil
import itertools
import enum
import SCons.Errors
import SCons
import SCons.Node.FS
from pkg_resources import parse_version
import distutils.sysconfig
from pathlib import Path
import logging
from typing import TYPE_CHECKING, Union
from typing import Union
try:
import numpy as np
except ImportError:
np = None
if TYPE_CHECKING:
import SCons.Environment as SCEnvironment
import SCons.Variables as SCVariables
__all__ = ("logger", "remove_directory", "remove_file", "test_results",
"add_RegressionTest", "get_command_output", "listify", "which",
"ConfigBuilder", "mglob", "get_spawn", "help")
class OutputFormatter(logging.Formatter):

View File

@@ -1,3 +1,5 @@
import os
from os.path import join as pjoin
from buildutils import *
Import('env', 'build', 'install')

View File

@@ -1,7 +1,10 @@
from __future__ import print_function
from buildutils import *
import os
import subprocess
from xml.etree import ElementTree
from os.path import join as pjoin
import time
from buildutils import *
Import('env','build','install')
localenv = env.Clone()

View File

@@ -1,3 +1,5 @@
import os
from os.path import join as pjoin
from buildutils import *
Import('env','build','install')