summaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-06-30 13:16:42 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2024-07-11 11:53:39 +0300
commit0d7bb776e2d97d406b726b90090bbfa8df13232b (patch)
tree78817e1840f0741439871682b3c25a1e40a3067f /mesonbuild/backend
parentc2552527fb2f607052c7aed633b67dbb19f06e38 (diff)
downloadmeson-0d7bb776e2d97d406b726b90090bbfa8df13232b.tar.gz
Move OptionKey in the option source file.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py6
-rw-r--r--mesonbuild/backend/ninjabackend.py3
-rw-r--r--mesonbuild/backend/vs2010backend.py3
-rw-r--r--mesonbuild/backend/xcodebackend.py3
4 files changed, 10 insertions, 5 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index b664300f4..0defad63e 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -27,8 +27,10 @@ from .. import mlog
from ..compilers import LANGUAGES_USING_LDFLAGS, detect
from ..mesonlib import (
File, MachineChoice, MesonException, OrderedSet,
- ExecutableSerialisation, classify_unity_sources, OptionKey
+ ExecutableSerialisation, classify_unity_sources,
)
+from ..options import OptionKey
+
if T.TYPE_CHECKING:
from .._typing import ImmutableListProtocol
@@ -1677,7 +1679,7 @@ class Backend:
bindir = Path(prefix, self.environment.get_bindir())
libdir = Path(prefix, self.environment.get_libdir())
incdir = Path(prefix, self.environment.get_includedir())
- _ldir = self.environment.coredata.get_option(mesonlib.OptionKey('localedir'))
+ _ldir = self.environment.coredata.get_option(OptionKey('localedir'))
assert isinstance(_ldir, str), 'for mypy'
localedir = Path(prefix, _ldir)
dest_path = Path(prefix, outdir, Path(fname).name) if outdir else Path(prefix, fname)
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 456615eed..d46dfacba 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -31,7 +31,8 @@ from ..mesonlib import (
File, LibType, MachineChoice, MesonBugException, MesonException, OrderedSet, PerMachine,
ProgressBar, quote_arg
)
-from ..mesonlib import get_compiler_for_source, has_path_sep, OptionKey
+from ..mesonlib import get_compiler_for_source, has_path_sep
+from ..options import OptionKey
from .backends import CleanTrees
from ..build import GeneratedList, InvalidArguments
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 496e8ffed..2187b8fa0 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -19,8 +19,9 @@ from .. import mlog
from .. import compilers
from .. import mesonlib
from ..mesonlib import (
- File, MesonBugException, MesonException, replace_if_different, OptionKey, version_compare, MachineChoice
+ File, MesonBugException, MesonException, replace_if_different, version_compare, MachineChoice
)
+from ..options import OptionKey
from ..environment import Environment, build_filename
from .. import coredata
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index f98ba7983..e1e8c5854 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -11,7 +11,8 @@ from .. import build
from .. import mesonlib
from .. import mlog
from ..arglist import CompilerArgs
-from ..mesonlib import MesonBugException, MesonException, OptionKey
+from ..mesonlib import MesonBugException, MesonException
+from ..options import OptionKey
if T.TYPE_CHECKING:
from ..build import BuildTarget