diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-12-04 13:02:53 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-05 00:22:10 +0200 |
commit | 286b9f0921157f920fcd5ebea8f835699e6208e7 (patch) | |
tree | 5e852508e5a8fe623d6f52b58464ad7085bf45e6 /run_tests.py | |
parent | 9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d (diff) | |
download | meson-286b9f0921157f920fcd5ebea8f835699e6208e7.zip meson-286b9f0921157f920fcd5ebea8f835699e6208e7.tar.gz meson-286b9f0921157f920fcd5ebea8f835699e6208e7.tar.bz2 |
lgtm: Fix Module imported with `import` and `import from`
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/run_tests.py b/run_tests.py index 504e6ac..33dc1be 100755 --- a/run_tests.py +++ b/run_tests.py @@ -26,7 +26,8 @@ from io import StringIO from enum import Enum from glob import glob from pathlib import Path -import mesonbuild +from mesonbuild import compilers +from mesonbuild import dependencies from mesonbuild import mesonlib from mesonbuild import mesonmain from mesonbuild import mtest @@ -95,7 +96,6 @@ class FakeCompilerOptions: self.value = [] def get_fake_options(prefix=''): - import argparse opts = argparse.Namespace() opts.native_file = [] opts.cross_file = None @@ -135,7 +135,7 @@ def get_meson_script(): running in-process (which is the default). ''' # Is there a meson.py next to the mesonbuild currently in use? - mesonbuild_dir = Path(mesonbuild.__file__).resolve().parent.parent + mesonbuild_dir = Path(mesonmain.__file__).resolve().parent.parent meson_script = mesonbuild_dir / 'meson.py' if meson_script.is_file(): return str(meson_script) @@ -263,12 +263,12 @@ def run_mtest_inprocess(commandlist): return returncode, mystdout.getvalue(), mystderr.getvalue() def clear_meson_configure_class_caches(): - mesonbuild.compilers.CCompiler.library_dirs_cache = {} - mesonbuild.compilers.CCompiler.program_dirs_cache = {} - mesonbuild.compilers.CCompiler.find_library_cache = {} - mesonbuild.compilers.CCompiler.find_framework_cache = {} - mesonbuild.dependencies.PkgConfigDependency.pkgbin_cache = {} - mesonbuild.dependencies.PkgConfigDependency.class_pkgbin = mesonlib.PerMachine(None, None) + compilers.CCompiler.library_dirs_cache = {} + compilers.CCompiler.program_dirs_cache = {} + compilers.CCompiler.find_library_cache = {} + compilers.CCompiler.find_framework_cache = {} + dependencies.PkgConfigDependency.pkgbin_cache = {} + dependencies.PkgConfigDependency.class_pkgbin = mesonlib.PerMachine(None, None) def run_configure_inprocess(commandlist, env=None): old_stdout = sys.stdout |