diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-01-17 18:19:59 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-06-26 13:10:33 -0400 |
commit | b1ddfabf8fbb0561a584bd7cfe2bb712b4105da2 (patch) | |
tree | 6cd7047a090608705215608940af3f7a03ee2442 /unittests | |
parent | c82305db0c5216f821e43bfc7ea3c8e314d0dccd (diff) | |
download | meson-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 'unittests')
-rw-r--r-- | unittests/allplatformstests.py | 2 | ||||
-rw-r--r-- | unittests/internaltests.py | 2 | ||||
-rw-r--r-- | unittests/linuxliketests.py | 2 | ||||
-rw-r--r-- | unittests/platformagnostictests.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 360360c..2d0b054 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -56,7 +56,7 @@ from mesonbuild.compilers import ( detect_compiler_for ) -from mesonbuild.dependencies import PkgConfigDependency +from mesonbuild.dependencies.pkgconfig import PkgConfigDependency from mesonbuild.build import Target, ConfigurationData, Executable, SharedLibrary, StaticLibrary import mesonbuild.modules.pkgconfig from mesonbuild.scripts import destdir_join diff --git a/unittests/internaltests.py b/unittests/internaltests.py index aea6890..6f04d94 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -46,7 +46,7 @@ from mesonbuild.mesonlib import ( OptionType ) from mesonbuild.interpreter.type_checking import in_set_validator, NoneType -from mesonbuild.dependencies import PkgConfigDependency +from mesonbuild.dependencies.pkgconfig import PkgConfigDependency from mesonbuild.programs import ExternalProgram import mesonbuild.modules.pkgconfig diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index c94169a..1911539 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -45,7 +45,7 @@ from mesonbuild.compilers.c import AppleClangCCompiler from mesonbuild.compilers.cpp import AppleClangCPPCompiler from mesonbuild.compilers.objc import AppleClangObjCCompiler from mesonbuild.compilers.objcpp import AppleClangObjCPPCompiler -from mesonbuild.dependencies import PkgConfigDependency +from mesonbuild.dependencies.pkgconfig import PkgConfigDependency import mesonbuild.modules.pkgconfig PKG_CONFIG = os.environ.get('PKG_CONFIG', 'pkg-config') diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index be90ee6..94ddec0 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -253,4 +253,4 @@ class PlatformAgnosticTests(BasePlatformTests): expected = json.load(f)['meson']['modules'] self.assertEqual(data['modules'], expected) - self.assertEqual(data['count'], 97) + self.assertEqual(data['count'], 81) |