aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-09-14 23:06:36 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-10-04 16:29:31 -0400
commit520996fff18a4d1545090f46549f9c15cec3bffa (patch)
tree1d405eacbf79c8033123c69174d563b3dbb1e09a /mesonbuild/cmake
parent1bb2523e5877b32554593b149b710606096bbe5e (diff)
downloadmeson-520996fff18a4d1545090f46549f9c15cec3bffa.zip
meson-520996fff18a4d1545090f46549f9c15cec3bffa.tar.gz
meson-520996fff18a4d1545090f46549f9c15cec3bffa.tar.bz2
remove double import
Imported both inside and outside of T.TYPE_CHECKING, the runtime import can be removed by quote-deferring one of the use sites. Update: In between then and now, this got removed from T.TYPE_CHECKING, move it back there rather than preserving the runtime import.
Diffstat (limited to 'mesonbuild/cmake')
-rw-r--r--mesonbuild/cmake/executor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py
index 65ff730..309b429 100644
--- a/mesonbuild/cmake/executor.py
+++ b/mesonbuild/cmake/executor.py
@@ -23,11 +23,11 @@ import re
import os
from .. import mlog
-from ..environment import Environment
from ..mesonlib import PerMachine, Popen_safe, version_compare, MachineChoice, is_windows, OptionKey
from ..programs import find_external_program, NonExistingExternalProgram
if T.TYPE_CHECKING:
+ from ..environment import Environment
from ..programs import ExternalProgram
TYPE_result = T.Tuple[int, T.Optional[str], T.Optional[str]]
@@ -65,7 +65,7 @@ class CMakeExecutor:
if self.prefix_paths:
self.extra_cmake_args += ['-DCMAKE_PREFIX_PATH={}'.format(';'.join(self.prefix_paths))]
- def find_cmake_binary(self, environment: Environment, silent: bool = False) -> T.Tuple[T.Optional['ExternalProgram'], T.Optional[str]]:
+ def find_cmake_binary(self, environment: 'Environment', silent: bool = False) -> T.Tuple[T.Optional['ExternalProgram'], T.Optional[str]]:
# Only search for CMake the first time and store the result in the class
# definition
if isinstance(CMakeExecutor.class_cmakebin[self.for_machine], NonExistingExternalProgram):