diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-09-13 09:38:19 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-09-28 19:36:13 -0400 |
commit | 2dfd952eb99590878430510644ffe99dd4a6a41d (patch) | |
tree | 53001a096d997511a8d12a44cf5019a2ff8d5a2b /mesonbuild/backend/backends.py | |
parent | a58ec322b3a9a07af83ea268341c16f972f52791 (diff) | |
download | meson-2dfd952eb99590878430510644ffe99dd4a6a41d.zip meson-2dfd952eb99590878430510644ffe99dd4a6a41d.tar.gz meson-2dfd952eb99590878430510644ffe99dd4a6a41d.tar.bz2 |
Move classes used by scripts to their own module
Those classes are used by wrapper scripts and we should not have to
import the rest of mesonlib, build.py, and all their dependencies for
that.
This renames mesonlib/ directory to utils/ and add a mesonlib.py module
that imports everything from utils/ to not have to change `import
mesonlib` everywhere. It allows to import utils.core without importing
the rest of mesonlib.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 8af8285..cd0a738 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -34,7 +34,8 @@ from .. import mlog from ..compilers import LANGUAGES_USING_LDFLAGS, detect from ..mesonlib import ( File, MachineChoice, MesonException, OrderedSet, - classify_unity_sources, OptionKey, join_args + classify_unity_sources, OptionKey, join_args, + ExecutableSerialisation ) if T.TYPE_CHECKING: @@ -185,27 +186,6 @@ class SubdirInstallData(InstallDataBase): super().__init__(path, install_path, install_path_name, install_mode, subproject, tag, data_type) self.exclude = exclude -@dataclass(eq=False) -class ExecutableSerialisation: - - # XXX: should capture and feed default to False, instead of None? - - cmd_args: T.List[str] - env: T.Optional[build.EnvironmentVariables] = None - exe_wrapper: T.Optional['programs.ExternalProgram'] = None - workdir: T.Optional[str] = None - extra_paths: T.Optional[T.List] = None - capture: T.Optional[bool] = None - feed: T.Optional[bool] = None - tag: T.Optional[str] = None - verbose: bool = False - - def __post_init__(self) -> None: - if self.exe_wrapper is not None: - assert isinstance(self.exe_wrapper, programs.ExternalProgram) - self.pickled = False - self.skip_if_destdir = False - self.subproject = '' @dataclass(eq=False) class TestSerialisation: |