From 0d7bb776e2d97d406b726b90090bbfa8df13232b Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 30 Jun 2024 13:16:42 +0300 Subject: Move OptionKey in the option source file. --- mesonbuild/dependencies/python.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mesonbuild/dependencies/python.py') diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index 883a29ad9..fff4aaa9e 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -16,6 +16,7 @@ from .framework import ExtraFrameworkDependency from .pkgconfig import PkgConfigDependency from ..environment import detect_cpu_family from ..programs import ExternalProgram +from ..options import OptionKey if T.TYPE_CHECKING: from typing_extensions import TypedDict @@ -240,13 +241,13 @@ class _PythonDependencyBase(_Base): # Python itself (except with pybind11, which has an ugly # hack to work around this) - so emit a warning to explain # the cause of the expected link error. - buildtype = self.env.coredata.get_option(mesonlib.OptionKey('buildtype')) + buildtype = self.env.coredata.get_option(OptionKey('buildtype')) assert isinstance(buildtype, str) - debug = self.env.coredata.get_option(mesonlib.OptionKey('debug')) + debug = self.env.coredata.get_option(OptionKey('debug')) # `debugoptimized` buildtype may not set debug=True currently, see gh-11645 is_debug_build = debug or buildtype == 'debug' vscrt_debug = False - if mesonlib.OptionKey('b_vscrt') in self.env.coredata.optstore: + if OptionKey('b_vscrt') in self.env.coredata.optstore: vscrt = self.env.coredata.optstore.get_value('b_vscrt') if vscrt in {'mdd', 'mtd', 'from_buildtype', 'static_from_buildtype'}: vscrt_debug = True -- cgit v1.2.3