aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-01-17 18:19:59 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-06-26 13:10:33 -0400
commitb1ddfabf8fbb0561a584bd7cfe2bb712b4105da2 (patch)
tree6cd7047a090608705215608940af3f7a03ee2442 /run_tests.py
parentc82305db0c5216f821e43bfc7ea3c8e314d0dccd (diff)
downloadmeson-b1ddfabf8fbb0561a584bd7cfe2bb712b4105da2.zip
meson-b1ddfabf8fbb0561a584bd7cfe2bb712b4105da2.tar.gz
meson-b1ddfabf8fbb0561a584bd7cfe2bb712b4105da2.tar.bz2
dependencies: defer importing a custom dependency until it is used
This lessens the amount of code imported at Meson startup by mapping each dependency to a dictionary entry and using a programmable import to dynamically return it. Minus 16 files and 6399 lines of code imported at startup.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/run_tests.py b/run_tests.py
index 41c9577..66341e4 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -36,7 +36,7 @@ import typing as T
from mesonbuild.compilers.c import CCompiler
from mesonbuild.compilers.detect import detect_c_compiler
-from mesonbuild import dependencies
+from mesonbuild.dependencies.pkgconfig import PkgConfigDependency
from mesonbuild import mesonlib
from mesonbuild import mesonmain
from mesonbuild import mtest
@@ -302,8 +302,8 @@ def run_mtest_inprocess(commandlist: T.List[str]) -> T.Tuple[int, str, str]:
def clear_meson_configure_class_caches() -> None:
CCompiler.find_library_cache = {}
CCompiler.find_framework_cache = {}
- dependencies.PkgConfigDependency.pkgbin_cache = {}
- dependencies.PkgConfigDependency.class_pkgbin = mesonlib.PerMachine(None, None)
+ PkgConfigDependency.pkgbin_cache = {}
+ PkgConfigDependency.class_pkgbin = mesonlib.PerMachine(None, None)
mesonlib.project_meson_versions = collections.defaultdict(str)
def run_configure_inprocess(commandlist: T.List[str], env: T.Optional[T.Dict[str, str]] = None, catch_exception: bool = False) -> T.Tuple[int, str, str]: