aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/lint.yml (renamed from .github/workflows/lint_mypy.yml)10
-rw-r--r--docs/markdown/Gnome-module.md4
-rw-r--r--docs/yaml/builtins/meson.yaml31
-rw-r--r--mesonbuild/interpreter/mesonmain.py46
-rw-r--r--mesonbuild/modules/cmake.py1
-rw-r--r--mesonbuild/modules/dlang.py2
-rw-r--r--mesonbuild/modules/fs.py1
-rw-r--r--mesonbuild/modules/gnome.py129
-rw-r--r--mesonbuild/modules/python3.py3
-rw-r--r--mesonbuild/modules/qt6.py2
-rw-r--r--mesonbuild/scripts/yelphelper.py133
-rw-r--r--test cases/common/246 dependency fallbacks/meson.build (renamed from test cases/common/245 dependency fallbacks/meson.build)0
-rw-r--r--test cases/common/246 dependency fallbacks/subprojects/png/meson.build (renamed from test cases/common/245 dependency fallbacks/subprojects/png/meson.build)0
-rw-r--r--test cases/common/247 deprecated option/meson.build (renamed from test cases/common/245 deprecated option/meson.build)0
-rw-r--r--test cases/common/247 deprecated option/meson_options.txt (renamed from test cases/common/245 deprecated option/meson_options.txt)0
-rw-r--r--test cases/common/247 deprecated option/test.json (renamed from test cases/common/245 deprecated option/test.json)0
-rw-r--r--test cases/common/248 install_emptydir/meson.build (renamed from test cases/common/246 install_emptydir/meson.build)0
-rw-r--r--test cases/common/248 install_emptydir/test.json (renamed from test cases/common/246 install_emptydir/test.json)0
-rw-r--r--test cases/common/249 install_symlink/datafile.dat (renamed from test cases/common/247 install_symlink/datafile.dat)0
-rw-r--r--test cases/common/249 install_symlink/meson.build (renamed from test cases/common/247 install_symlink/meson.build)0
-rw-r--r--test cases/common/249 install_symlink/test.json (renamed from test cases/common/247 install_symlink/test.json)0
-rw-r--r--test cases/failing/107 feature require.bis/meson.build (renamed from test cases/failing/106 feature require.bis/meson.build)0
-rw-r--r--test cases/failing/107 feature require.bis/meson_options.txt (renamed from test cases/failing/106 feature require.bis/meson_options.txt)0
-rw-r--r--test cases/failing/107 feature require.bis/test.json (renamed from test cases/failing/106 feature require.bis/test.json)0
-rw-r--r--test cases/failing/108 no build get_external_property/meson.build (renamed from test cases/failing/107 no build get_external_property/meson.build)0
-rw-r--r--test cases/failing/108 no build get_external_property/test.json (renamed from test cases/failing/107 no build get_external_property/test.json)2
-rw-r--r--test cases/failing/109 enter subdir twice/meson.build (renamed from test cases/failing/108 enter subdir twice/meson.build)0
-rw-r--r--test cases/failing/109 enter subdir twice/sub/meson.build (renamed from test cases/failing/108 enter subdir twice/sub/meson.build)0
-rw-r--r--test cases/failing/109 enter subdir twice/test.json (renamed from test cases/failing/108 enter subdir twice/test.json)2
-rw-r--r--test cases/failing/111 invalid fstring/109 invalid fstring/meson.build (renamed from test cases/failing/109 invalid fstring/meson.build)0
-rw-r--r--test cases/failing/111 invalid fstring/109 invalid fstring/test.json (renamed from test cases/failing/109 invalid fstring/test.json)0
-rw-r--r--test cases/failing/111 invalid fstring/meson.build (renamed from test cases/failing/110 invalid fstring/meson.build)0
-rw-r--r--test cases/failing/111 invalid fstring/test.json (renamed from test cases/failing/110 invalid fstring/test.json)2
-rw-r--r--test cases/failing/112 compiler argument checking/meson.build (renamed from test cases/failing/111 compiler argument checking/meson.build)0
-rw-r--r--test cases/failing/112 compiler argument checking/test.json (renamed from test cases/failing/111 compiler argument checking/test.json)2
-rw-r--r--test cases/failing/113 empty fallback/meson.build (renamed from test cases/failing/112 empty fallback/meson.build)0
-rw-r--r--test cases/failing/113 empty fallback/subprojects/foo/meson.build (renamed from test cases/failing/112 empty fallback/subprojects/foo/meson.build)0
-rw-r--r--test cases/failing/113 empty fallback/test.json (renamed from test cases/failing/112 empty fallback/test.json)2
-rw-r--r--test cases/failing/114 cmake executable dependency/meson.build (renamed from test cases/failing/113 cmake executable dependency/meson.build)0
-rw-r--r--test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt (renamed from test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt)0
-rw-r--r--test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c (renamed from test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c)0
-rw-r--r--test cases/failing/114 cmake executable dependency/test.json (renamed from test cases/failing/113 cmake executable dependency/test.json)2
-rw-r--r--test cases/failing/115 allow_fallback with fallback/meson.build (renamed from test cases/failing/114 allow_fallback with fallback/meson.build)0
-rw-r--r--test cases/failing/115 allow_fallback with fallback/test.json (renamed from test cases/failing/114 allow_fallback with fallback/test.json)2
-rw-r--r--test cases/failing/116 nonsensical bindgen/meson.build (renamed from test cases/failing/115 nonsensical bindgen/meson.build)0
-rw-r--r--test cases/failing/116 nonsensical bindgen/src/header.h (renamed from test cases/failing/115 nonsensical bindgen/src/header.h)0
-rw-r--r--test cases/failing/116 nonsensical bindgen/src/source.c (renamed from test cases/failing/115 nonsensical bindgen/src/source.c)0
-rw-r--r--test cases/failing/116 nonsensical bindgen/test.json (renamed from test cases/failing/115 nonsensical bindgen/test.json)2
-rw-r--r--test cases/failing/117 run_target in test/meson.build (renamed from test cases/failing/116 run_target in test/meson.build)0
-rw-r--r--test cases/failing/117 run_target in test/test.json (renamed from test cases/failing/116 run_target in test/test.json)2
-rw-r--r--test cases/failing/117 run_target in test/trivial.c (renamed from test cases/failing/116 run_target in test/trivial.c)0
-rw-r--r--test cases/failing/118 run_target in add_install_script/meson.build (renamed from test cases/failing/117 run_target in add_install_script/meson.build)0
-rw-r--r--test cases/failing/118 run_target in add_install_script/test.json (renamed from test cases/failing/117 run_target in add_install_script/test.json)2
-rw-r--r--test cases/failing/118 run_target in add_install_script/trivial.c (renamed from test cases/failing/117 run_target in add_install_script/trivial.c)0
-rw-r--r--test cases/failing/119 pathsep in install_symlink/meson.build (renamed from test cases/failing/118 pathsep in install_symlink/meson.build)0
-rw-r--r--test cases/failing/119 pathsep in install_symlink/test.json (renamed from test cases/failing/118 pathsep in install_symlink/test.json)2
-rw-r--r--test cases/frameworks/13 yelp/help/C/index2.page8
-rw-r--r--test cases/frameworks/13 yelp/help/C/index3.page8
-rw-r--r--test cases/frameworks/13 yelp/help/meson.build4
-rw-r--r--test cases/frameworks/13 yelp/test.json12
-rw-r--r--test cases/unit/100 custom target name/file.txt.in (renamed from test cases/unit/99 custom target name/file.txt.in)0
-rw-r--r--test cases/unit/100 custom target name/meson.build (renamed from test cases/unit/99 custom target name/meson.build)0
-rw-r--r--test cases/unit/100 custom target name/subdir/meson.build (renamed from test cases/unit/99 custom target name/subdir/meson.build)0
-rwxr-xr-xtest cases/unit/101 relative find program/foo.py (renamed from test cases/unit/99 relative find program/foo.py)0
-rw-r--r--test cases/unit/101 relative find program/meson.build (renamed from test cases/unit/99 relative find program/meson.build)0
-rw-r--r--test cases/unit/101 relative find program/subdir/meson.build (renamed from test cases/unit/99 relative find program/subdir/meson.build)0
-rw-r--r--test cases/unit/102 rlib linkage/lib2.rs (renamed from test cases/unit/100 rlib linkage/lib2.rs)0
-rw-r--r--test cases/unit/102 rlib linkage/main.rs (renamed from test cases/unit/100 rlib linkage/main.rs)0
-rw-r--r--test cases/unit/102 rlib linkage/meson.build (renamed from test cases/unit/100 rlib linkage/meson.build)0
-rw-r--r--test cases/unit/103 python without pkgconfig/meson.build (renamed from test cases/unit/101 python without pkgconfig/meson.build)0
-rw-r--r--test cases/unit/98 link full name/.gitignore (renamed from test cases/unit/97 link full name/.gitignore)0
-rw-r--r--test cases/unit/98 link full name/libtestprovider/meson.build (renamed from test cases/unit/97 link full name/libtestprovider/meson.build)0
-rw-r--r--test cases/unit/98 link full name/libtestprovider/provider.c (renamed from test cases/unit/97 link full name/libtestprovider/provider.c)0
-rw-r--r--test cases/unit/98 link full name/proguser/meson.build (renamed from test cases/unit/97 link full name/proguser/meson.build)0
-rw-r--r--test cases/unit/98 link full name/proguser/receiver.c (renamed from test cases/unit/97 link full name/proguser/receiver.c)0
-rw-r--r--test cases/unit/99 install all targets/bar-custom.txt (renamed from test cases/unit/98 install all targets/bar-custom.txt)0
-rw-r--r--test cases/unit/99 install all targets/bar-devel.h (renamed from test cases/unit/98 install all targets/bar-devel.h)0
-rw-r--r--test cases/unit/99 install all targets/bar-notag.txt (renamed from test cases/unit/98 install all targets/bar-notag.txt)0
-rw-r--r--test cases/unit/99 install all targets/custom_files/data.txt (renamed from test cases/unit/98 install all targets/custom_files/data.txt)0
-rw-r--r--test cases/unit/99 install all targets/foo.in (renamed from test cases/unit/98 install all targets/foo.in)0
-rw-r--r--test cases/unit/99 install all targets/foo1-devel.h (renamed from test cases/unit/98 install all targets/foo1-devel.h)0
-rw-r--r--test cases/unit/99 install all targets/lib.c (renamed from test cases/unit/98 install all targets/lib.c)0
-rw-r--r--test cases/unit/99 install all targets/main.c (renamed from test cases/unit/98 install all targets/main.c)0
-rw-r--r--test cases/unit/99 install all targets/meson.build (renamed from test cases/unit/98 install all targets/meson.build)0
-rw-r--r--test cases/unit/99 install all targets/script.py (renamed from test cases/unit/98 install all targets/script.py)0
-rw-r--r--test cases/unit/99 install all targets/subdir/bar2-devel.h (renamed from test cases/unit/98 install all targets/subdir/bar2-devel.h)0
-rw-r--r--test cases/unit/99 install all targets/subdir/foo2.in (renamed from test cases/unit/98 install all targets/subdir/foo2.in)0
-rw-r--r--test cases/unit/99 install all targets/subdir/foo3-devel.h (renamed from test cases/unit/98 install all targets/subdir/foo3-devel.h)0
-rw-r--r--test cases/unit/99 install all targets/subdir/lib.c (renamed from test cases/unit/98 install all targets/subdir/lib.c)0
-rw-r--r--test cases/unit/99 install all targets/subdir/main.c (renamed from test cases/unit/98 install all targets/subdir/main.c)0
-rw-r--r--test cases/unit/99 install all targets/subdir/meson.build (renamed from test cases/unit/98 install all targets/subdir/meson.build)0
-rw-r--r--test cases/unit/99 install all targets/subdir/script.py (renamed from test cases/unit/98 install all targets/subdir/script.py)0
-rwxr-xr-xtools/dircondenser.py2
-rw-r--r--unittests/allplatformstests.py8
-rw-r--r--unittests/linuxliketests.py4
-rw-r--r--unittests/platformagnostictests.py4
96 files changed, 194 insertions, 240 deletions
diff --git a/.github/workflows/lint_mypy.yml b/.github/workflows/lint.yml
index 9572707..cdfed11 100644
--- a/.github/workflows/lint_mypy.yml
+++ b/.github/workflows/lint.yml
@@ -1,22 +1,22 @@
-name: LintMypy
+name: Lint
concurrency:
- group: mypy-${{ github.head_ref }}
+ group: lint-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
paths:
- "**.py"
- - ".github/workflows/lint_mypy.yml"
+ - ".github/workflows/lint.yml"
pull_request:
paths:
- "**.py"
- - ".github/workflows/lint_mypy.yml"
+ - ".github/workflows/lint.yml"
jobs:
- lint:
+ pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md
index 4f08c6d..1bcf15d 100644
--- a/docs/markdown/Gnome-module.md
+++ b/docs/markdown/Gnome-module.md
@@ -321,8 +321,8 @@ VAPI or Vala binaries.
languages: []string, symlink_media: bool = true): void
```
-Installs help documentation using Yelp. The first argument is the
-project id.
+Installs help documentation for Yelp using itstool and gettext. The first
+argument is the project id.
Additionally, sources can be passed as additional positional arguments. This
was, however, undocumented and never officially supported. Due to a longstanding
diff --git a/docs/yaml/builtins/meson.yaml b/docs/yaml/builtins/meson.yaml
index 4f2d24d..00ade2e 100644
--- a/docs/yaml/builtins/meson.yaml
+++ b/docs/yaml/builtins/meson.yaml
@@ -34,18 +34,17 @@ methods:
posargs:
script_name:
- type: str | file | external_program | exe | custom_tgt | custom_idx
+ type: str | file | external_program
description: |
The script to execute.
- *(since 0.55.0)* The output of [[configure_file]], [[files]], and [[find_program]]
- as well as strings are accepted.
+ *(since 0.55.0)* The output of [[find_program]] as well as strings are accepted.
*(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used.
varargs:
name: arg
- type: str | file | external_program | exe | custom_tgt | custom_idx
+ type: str | file | external_program
since: 0.49.0
description: |
Additional arguments
@@ -53,8 +52,6 @@ methods:
*(since 0.55.0)* The output of [[configure_file]], [[files]], and [[find_program]]
as well as strings are accepted.
- *(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used.
-
- name: add_install_script
returns: void
description: |
@@ -89,8 +86,26 @@ methods:
shell would. If your script uses Python, `shlex.split()` is the
easiest correct way to do this.
- posargs_inherit: meson.add_dist_script
- varargs_inherit: meson.add_dist_script
+ posargs:
+ script_name:
+ type: str | file | external_program | exe | custom_tgt | custom_idx
+ description: |
+ The script to execute.
+
+ *(since 0.55.0)* The output of [[find_program]], [[executable]],
+ [[custom_target]], as well as strings are accepted.
+
+ *(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used.
+
+ varargs:
+ name: arg
+ type: str | file | external_program | exe | custom_tgt | custom_idx
+ since: 0.49.0
+ description: |
+ Additional arguments
+
+ *(since 0.55.0)* The output of [[find_program]], [[executable]],
+ [[custom_target]], as well as strings are accepted.
kwargs:
skip_if_destdir:
diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py
index e973c5d..be1acc6 100644
--- a/mesonbuild/interpreter/mesonmain.py
+++ b/mesonbuild/interpreter/mesonmain.py
@@ -79,13 +79,19 @@ class MesonMain(MesonInterpreterObject):
})
def _find_source_script(
- self, prog: T.Union[str, mesonlib.File, build.Executable, ExternalProgram],
+ self, name: str, prog: T.Union[str, mesonlib.File, build.Executable, ExternalProgram],
args: T.List[str]) -> 'ExecutableSerialisation':
largs: T.List[T.Union[str, build.Executable, ExternalProgram]] = []
+
if isinstance(prog, (build.Executable, ExternalProgram)):
+ FeatureNew.single_use(f'Passing executable/found program object to script parameter of {name}',
+ '0.55.0', self.subproject, location=self.current_node)
largs.append(prog)
largs.extend(args)
return self.interpreter.backend.get_executable_serialisation(largs)
+ elif isinstance(prog, mesonlib.File):
+ FeatureNew.single_use(f'Passing file object to script parameter of {name}',
+ '0.57.0', self.subproject, location=self.current_node)
found = self.interpreter.find_program_impl([prog])
largs.append(found)
largs.extend(args)
@@ -98,7 +104,7 @@ class MesonMain(MesonInterpreterObject):
str, mesonlib.File, build.BuildTarget, build.CustomTarget,
build.CustomTargetIndex,
ExternalProgram,
- ]], allow_built: bool = False) -> T.List[str]:
+ ]]) -> T.List[str]:
script_args = [] # T.List[str]
new = False
for a in args:
@@ -108,8 +114,6 @@ class MesonMain(MesonInterpreterObject):
new = True
script_args.append(a.rel_to_builddir(self.interpreter.environment.source_dir))
elif isinstance(a, (build.BuildTarget, build.CustomTarget, build.CustomTargetIndex)):
- if not allow_built:
- raise InterpreterException(f'Arguments to {name} cannot be built')
new = True
script_args.extend([os.path.join(a.get_subdir(), o) for o in a.get_outputs()])
@@ -147,12 +151,8 @@ class MesonMain(MesonInterpreterObject):
args: T.Tuple[T.Union[str, mesonlib.File, build.Executable, ExternalProgram],
T.List[T.Union[str, mesonlib.File, build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, ExternalProgram]]],
kwargs: 'AddInstallScriptKW') -> None:
- if isinstance(args[0], mesonlib.File):
- FeatureNew.single_use('Passing file object to script parameter of add_install_script',
- '0.57.0', self.interpreter.subproject)
-
- script_args = self._process_script_args('add_install_script', args[1], allow_built=True)
- script = self._find_source_script(args[0], script_args)
+ script_args = self._process_script_args('add_install_script', args[1])
+ script = self._find_source_script('add_install_script', args[0], script_args)
script.skip_if_destdir = kwargs['skip_if_destdir']
script.tag = kwargs['install_tag']
self.build.install_scripts.append(script)
@@ -160,43 +160,37 @@ class MesonMain(MesonInterpreterObject):
@typed_pos_args(
'meson.add_postconf_script',
(str, mesonlib.File, ExternalProgram),
- varargs=(str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex)
+ varargs=(str, mesonlib.File, ExternalProgram)
)
@noKwargs
def add_postconf_script_method(
self,
args: T.Tuple[T.Union[str, mesonlib.File, ExternalProgram],
- T.List[T.Union[str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex]]],
+ T.List[T.Union[str, mesonlib.File, ExternalProgram]]],
kwargs: 'TYPE_kwargs') -> None:
- if isinstance(args[0], mesonlib.File):
- FeatureNew.single_use('Passing file object to script parameter of add_postconf_script',
- '0.57.0', self.interpreter.subproject)
- script_args = self._process_script_args('add_postconf_script', args[1], allow_built=True)
- script = self._find_source_script(args[0], script_args)
+ script_args = self._process_script_args('add_postconf_script', args[1])
+ script = self._find_source_script('add_postconf_script', args[0], script_args)
self.build.postconf_scripts.append(script)
@typed_pos_args(
'meson.add_dist_script',
- (str, mesonlib.File, build.Executable, ExternalProgram),
- varargs=(str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex)
+ (str, mesonlib.File, ExternalProgram),
+ varargs=(str, mesonlib.File, ExternalProgram)
)
@noKwargs
def add_dist_script_method(
self,
- args: T.Tuple[T.Union[str, mesonlib.File, build.Executable, ExternalProgram],
- T.List[T.Union[str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex]]],
+ args: T.Tuple[T.Union[str, mesonlib.File, ExternalProgram],
+ T.List[T.Union[str, mesonlib.File, ExternalProgram]]],
kwargs: 'TYPE_kwargs') -> None:
if args[1]:
FeatureNew.single_use('Calling "add_dist_script" with multiple arguments',
'0.49.0', self.interpreter.subproject)
- if isinstance(args[0], mesonlib.File):
- FeatureNew.single_use('Passing file object to script parameter of add_dist_script',
- '0.57.0', self.interpreter.subproject)
if self.interpreter.subproject != '':
FeatureNew.single_use('Calling "add_dist_script" in a subproject',
'0.58.0', self.interpreter.subproject)
- script_args = self._process_script_args('add_dist_script', args[1], allow_built=True)
- script = self._find_source_script(args[0], script_args)
+ script_args = self._process_script_args('add_dist_script', args[1])
+ script = self._find_source_script('add_dist_script', args[0], script_args)
self.build.dist_scripts.append(script)
@noPosargs
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index fd831e6..0c61b47 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -212,6 +212,7 @@ class CmakeModule(ExtensionModule):
cmake_detected = False
cmake_root = None
+ @FeatureNew('CMake Module', '0.50.0')
def __init__(self, interpreter):
super().__init__(interpreter)
self.methods.update({
diff --git a/mesonbuild/modules/dlang.py b/mesonbuild/modules/dlang.py
index ddb780b..558ca81 100644
--- a/mesonbuild/modules/dlang.py
+++ b/mesonbuild/modules/dlang.py
@@ -21,12 +21,14 @@ import os
from . import ExtensionModule
from .. import dependencies
from .. import mlog
+from ..interpreterbase import FeatureNew
from ..mesonlib import Popen_safe, MesonException
class DlangModule(ExtensionModule):
class_dubbin = None
init_dub = False
+ @FeatureNew('Dlang Module', '0.48.0')
def __init__(self, interpreter):
super().__init__(interpreter)
self.methods.update({
diff --git a/mesonbuild/modules/fs.py b/mesonbuild/modules/fs.py
index ab3aae2..5faee83 100644
--- a/mesonbuild/modules/fs.py
+++ b/mesonbuild/modules/fs.py
@@ -41,6 +41,7 @@ if T.TYPE_CHECKING:
class FSModule(ExtensionModule):
+ @FeatureNew('Fs Module', '0.53.0')
def __init__(self, interpreter: 'Interpreter') -> None:
super().__init__(interpreter)
self.methods.update({
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 1f053f5..1125e56 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -39,6 +39,7 @@ from ..mesonlib import (
MachineChoice, MesonException, OrderedSet, Popen_safe, join_args,
)
from ..programs import ExternalProgram, OverrideProgram, EmptyExternalProgram
+from ..scripts.gettext import read_linguas
if T.TYPE_CHECKING:
from typing_extensions import Literal, TypedDict
@@ -1154,47 +1155,99 @@ class GnomeModule(ExtensionModule):
raise MesonException('Yelp requires a list of sources')
elif args[1]:
mlog.warning('"gnome.yelp" ignores positional sources arguments when the "sources" keyword argument is set')
- source_str = '@@'.join(sources)
+ sources_files = [mesonlib.File.from_source_file(state.environment.source_dir,
+ os.path.join(state.subdir, 'C'),
+ s) for s in sources]
langs = kwargs['languages']
+ if not langs:
+ langs = read_linguas(os.path.join(state.environment.source_dir, state.subdir))
+
+ media = kwargs['media']
+ symlinks = kwargs['symlink_media']
+ targets: T.List[T.Union['Target', build.Data, build.SymlinkData]] = []
+ potargets: T.List[build.RunTarget] = []
+
+ itstool = state.find_program('itstool')
+ msgmerge = state.find_program('msgmerge')
+ msgfmt = state.find_program('msgfmt')
+
+ install_dir = os.path.join(state.environment.get_datadir(), 'help')
+ c_install_dir = os.path.join(install_dir, 'C', project_id)
+ c_data = build.Data(sources_files, c_install_dir, c_install_dir,
+ mesonlib.FileMode(), state.subproject)
+ targets.append(c_data)
+
+ media_files: T.List[mesonlib.File] = []
+ for m in media:
+ f = mesonlib.File.from_source_file(state.environment.source_dir,
+ os.path.join(state.subdir, 'C'), m)
+ media_files.append(f)
+ m_install_dir = os.path.join(c_install_dir, os.path.dirname(m))
+ m_data = build.Data([f], m_install_dir, m_install_dir,
+ mesonlib.FileMode(), state.subproject)
+ targets.append(m_data)
+
+ pot_file = os.path.join('@SOURCE_ROOT@', state.subdir, 'C', project_id + '.pot')
+ pot_sources = [os.path.join('@SOURCE_ROOT@', state.subdir, 'C', s) for s in sources]
+ pot_args = [itstool, '-o', pot_file] + pot_sources
+ pottarget = build.RunTarget(f'help-{project_id}-pot', pot_args, [],
+ os.path.join(state.subdir, 'C'), state.subproject)
+ targets.append(pottarget)
+
+ for l in langs:
+ l_subdir = os.path.join(state.subdir, l)
+ l_install_dir = os.path.join(install_dir, l, project_id)
+
+ for i, m in enumerate(media):
+ m_dir = os.path.dirname(m)
+ m_install_dir = os.path.join(l_install_dir, m_dir)
+ if symlinks:
+ link_target = os.path.join(os.path.relpath(c_install_dir, start=m_install_dir), m)
+ l_data = build.SymlinkData(link_target, os.path.basename(m),
+ m_install_dir, state.subproject)
+ else:
+ try:
+ m_file = mesonlib.File.from_source_file(state.environment.source_dir, l_subdir, m)
+ except MesonException:
+ m_file = media_files[i]
+ l_data = build.Data([m_file], m_install_dir, m_install_dir,
+ mesonlib.FileMode(), state.subproject)
+ targets.append(l_data)
+
+ po_file = l + '.po'
+ po_args = [msgmerge, '-q', '-o',
+ os.path.join('@SOURCE_ROOT@', l_subdir, po_file),
+ os.path.join('@SOURCE_ROOT@', l_subdir, po_file), pot_file]
+ potarget = build.RunTarget(f'help-{project_id}-{l}-update-po',
+ po_args, [pottarget], l_subdir, state.subproject)
+ targets.append(potarget)
+ potargets.append(potarget)
+
+ gmo_file = project_id + '-' + l + '.gmo'
+ gmo_kwargs = {'command': [msgfmt, '@INPUT@', '-o', '@OUTPUT@'],
+ 'input': po_file,
+ 'output': gmo_file,
+ }
+ gmotarget = build.CustomTarget(f'help-{project_id}-{l}-gmo', l_subdir, state.subproject, gmo_kwargs)
+ targets.append(gmotarget)
+
+ merge_kwargs = {'command': [itstool, '-m', os.path.join(l_subdir, gmo_file),
+ '-o', '@OUTDIR@', '@INPUT@'],
+ 'input': sources_files,
+ 'output': sources,
+ 'depends': gmotarget,
+ 'install': True,
+ 'install_dir': l_install_dir,
+ }
+ mergetarget = build.CustomTarget(f'help-{project_id}-{l}', l_subdir, state.subproject, merge_kwargs)
+ targets.append(mergetarget)
- script = state.environment.get_build_command()
- inscript_args = ['--internal',
- 'yelphelper',
- 'install',
- '--subdir=' + state.subdir,
- '--id=' + project_id,
- '--installdir=' + os.path.join(state.environment.get_datadir(), 'help'),
- '--sources=' + source_str]
- if kwargs['symlink_media']:
- inscript_args.append('--symlinks=true')
- if kwargs['media']:
- inscript_args.append('--media=' + '@@'.join(kwargs['media']))
- if langs:
- inscript_args.append('--langs=' + '@@'.join(langs))
- inscript = state.backend.get_executable_serialisation(script + inscript_args)
-
- potargs = state.environment.get_build_command() + [
- '--internal', 'yelphelper', 'pot',
- '--subdir=' + state.subdir,
- '--id=' + project_id,
- '--sources=' + source_str,
- ]
- pottarget = build.RunTarget('help-' + project_id + '-pot', potargs,
- [], state.subdir, state.subproject)
-
- poargs = state.environment.get_build_command() + [
- '--internal', 'yelphelper', 'update-po',
- '--subdir=' + state.subdir,
- '--id=' + project_id,
- '--sources=' + source_str,
- '--langs=' + '@@'.join(langs),
- ]
- potarget = build.RunTarget('help-' + project_id + '-update-po', poargs,
- [], state.subdir, state.subproject)
-
- rv: T.List[T.Union[build.ExecutableSerialisation, build.RunTarget]] = [inscript, pottarget, potarget]
- return ModuleReturnValue(None, rv)
+ allpotarget = build.AliasTarget(f'help-{project_id}-update-po', potargets,
+ state.subdir, state.subproject)
+ targets.append(allpotarget)
+
+ return ModuleReturnValue(None, targets)
@typed_pos_args('gnome.gtkdoc', str)
@typed_kwargs(
diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py
index dc1f7c7..f7600e2 100644
--- a/mesonbuild/modules/python3.py
+++ b/mesonbuild/modules/python3.py
@@ -16,12 +16,13 @@ import sysconfig
from .. import mesonlib
from . import ExtensionModule
-from ..interpreterbase import noKwargs, permittedKwargs, FeatureDeprecated
+from ..interpreterbase import noKwargs, permittedKwargs, FeatureDeprecated, FeatureNew
from ..build import known_shmod_kwargs
from ..programs import ExternalProgram
class Python3Module(ExtensionModule):
+ @FeatureNew('python3 module', '0.38.0')
@FeatureDeprecated('python3 module', '0.48.0')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
diff --git a/mesonbuild/modules/qt6.py b/mesonbuild/modules/qt6.py
index d9cd651..3cfe243 100644
--- a/mesonbuild/modules/qt6.py
+++ b/mesonbuild/modules/qt6.py
@@ -13,10 +13,12 @@
# limitations under the License.
from .qt import QtBaseModule
+from ..interpreterbase import FeatureNew
class Qt6Module(QtBaseModule):
+ @FeatureNew('Qt6 Module', '0.57.0')
def __init__(self, interpreter):
QtBaseModule.__init__(self, interpreter, qt_version=6)
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py
deleted file mode 100644
index 374104b..0000000
--- a/mesonbuild/scripts/yelphelper.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 2016 The Meson development team
-
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-
-# http://www.apache.org/licenses/LICENSE-2.0
-
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import os
-import subprocess
-import shutil
-import argparse
-from .. import mlog
-from ..mesonlib import has_path_sep
-from . import destdir_join
-from .gettext import read_linguas
-import typing as T
-
-parser = argparse.ArgumentParser()
-parser.add_argument('command')
-parser.add_argument('--id', dest='project_id')
-parser.add_argument('--subdir', dest='subdir')
-parser.add_argument('--installdir', dest='install_dir')
-parser.add_argument('--sources', dest='sources')
-parser.add_argument('--media', dest='media', default='')
-parser.add_argument('--langs', dest='langs', default='')
-parser.add_argument('--symlinks', type=bool, dest='symlinks', default=False)
-
-def build_pot(srcdir: str, project_id: str, sources: T.List[str]) -> None:
- # Must be relative paths
- sources = [os.path.join('C', source) for source in sources]
- outfile = os.path.join(srcdir, project_id + '.pot')
- subprocess.call(['itstool', '-o', outfile] + sources)
-
-def update_po(srcdir: str, project_id: str, langs: T.List[str]) -> None:
- potfile = os.path.join(srcdir, project_id + '.pot')
- for lang in langs:
- pofile = os.path.join(srcdir, lang, lang + '.po')
- subprocess.call(['msgmerge', '-q', '-o', pofile, pofile, potfile])
-
-def build_translations(srcdir: str, blddir: str, langs: T.List[str]) -> None:
- for lang in langs:
- outdir = os.path.join(blddir, lang)
- os.makedirs(outdir, exist_ok=True)
- subprocess.call([
- 'msgfmt', os.path.join(srcdir, lang, lang + '.po'),
- '-o', os.path.join(outdir, lang + '.gmo')
- ])
-
-def merge_translations(blddir: str, sources: T.List[str], langs: T.List[str]) -> None:
- for lang in langs:
- subprocess.call([
- 'itstool', '-m', os.path.join(blddir, lang, lang + '.gmo'),
- '-o', os.path.join(blddir, lang)
- ] + sources)
-
-def install_help(srcdir: str, blddir: str, sources: T.List[str], media: T.List[str], langs: T.List[str], install_dir: str, destdir: str, project_id: str, symlinks: bool) -> None:
- c_install_dir = os.path.join(install_dir, 'C', project_id)
- for lang in langs + ['C']:
- indir = destdir_join(destdir, os.path.join(install_dir, lang, project_id))
- os.makedirs(indir, exist_ok=True)
- for source in sources:
- infile = os.path.join(srcdir if lang == 'C' else blddir, lang, source)
- outfile = os.path.join(indir, source)
- mlog.log(f'Installing {infile} to {outfile}')
- shutil.copy2(infile, outfile)
- for m in media:
- infile = os.path.join(srcdir, lang, m)
- outfile = os.path.join(indir, m)
- c_infile = os.path.join(srcdir, 'C', m)
- if not os.path.exists(infile):
- if not os.path.exists(c_infile):
- mlog.warning('Media file "%s" did not exist in C directory' % m)
- continue
- elif symlinks:
- srcfile = os.path.join(c_install_dir, m)
- mlog.log(f'Symlinking {outfile} to {srcfile}.')
- if has_path_sep(m):
- os.makedirs(os.path.dirname(outfile), exist_ok=True)
- try:
- try:
- os.symlink(srcfile, outfile)
- except FileExistsError:
- os.remove(outfile)
- os.symlink(srcfile, outfile)
- continue
- except (NotImplementedError, OSError):
- mlog.warning('Symlinking not supported, falling back to copying')
- infile = c_infile
- else:
- # Lang doesn't have media file so copy it over 'C' one
- infile = c_infile
- mlog.log(f'Installing {infile} to {outfile}')
- if has_path_sep(m):
- os.makedirs(os.path.dirname(outfile), exist_ok=True)
- shutil.copyfile(infile, outfile)
- shutil.copystat(infile, outfile)
-
-def run(args: T.List[str]) -> int:
- options = parser.parse_args(args)
- langs = options.langs.split('@@') if options.langs else []
- media = options.media.split('@@') if options.media else []
- sources = options.sources.split('@@')
- destdir = os.environ.get('DESTDIR', '')
- src_subdir = os.path.join(os.environ['MESON_SOURCE_ROOT'], options.subdir)
- build_subdir = os.path.join(os.environ['MESON_BUILD_ROOT'], options.subdir)
- abs_sources = [os.path.join(src_subdir, 'C', source) for source in sources]
-
- if not langs:
- langs = read_linguas(src_subdir)
-
- if options.command == 'pot':
- build_pot(src_subdir, options.project_id, sources)
- elif options.command == 'update-po':
- build_pot(src_subdir, options.project_id, sources)
- update_po(src_subdir, options.project_id, langs)
- elif options.command == 'build':
- if langs:
- build_translations(src_subdir, build_subdir, langs)
- elif options.command == 'install':
- install_dir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], options.install_dir)
- if langs:
- build_translations(src_subdir, build_subdir, langs)
- merge_translations(build_subdir, abs_sources, langs)
- install_help(src_subdir, build_subdir, sources, media, langs, install_dir,
- destdir, options.project_id, options.symlinks)
- return 0
diff --git a/test cases/common/245 dependency fallbacks/meson.build b/test cases/common/246 dependency fallbacks/meson.build
index aaabaaa..aaabaaa 100644
--- a/test cases/common/245 dependency fallbacks/meson.build
+++ b/test cases/common/246 dependency fallbacks/meson.build
diff --git a/test cases/common/245 dependency fallbacks/subprojects/png/meson.build b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build
index 5efc60a..5efc60a 100644
--- a/test cases/common/245 dependency fallbacks/subprojects/png/meson.build
+++ b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build
diff --git a/test cases/common/245 deprecated option/meson.build b/test cases/common/247 deprecated option/meson.build
index 5102fd0..5102fd0 100644
--- a/test cases/common/245 deprecated option/meson.build
+++ b/test cases/common/247 deprecated option/meson.build
diff --git a/test cases/common/245 deprecated option/meson_options.txt b/test cases/common/247 deprecated option/meson_options.txt
index 5814531..5814531 100644
--- a/test cases/common/245 deprecated option/meson_options.txt
+++ b/test cases/common/247 deprecated option/meson_options.txt
diff --git a/test cases/common/245 deprecated option/test.json b/test cases/common/247 deprecated option/test.json
index c2f2ca3..c2f2ca3 100644
--- a/test cases/common/245 deprecated option/test.json
+++ b/test cases/common/247 deprecated option/test.json
diff --git a/test cases/common/246 install_emptydir/meson.build b/test cases/common/248 install_emptydir/meson.build
index a5eb046..a5eb046 100644
--- a/test cases/common/246 install_emptydir/meson.build
+++ b/test cases/common/248 install_emptydir/meson.build
diff --git a/test cases/common/246 install_emptydir/test.json b/test cases/common/248 install_emptydir/test.json
index 17abe74..17abe74 100644
--- a/test cases/common/246 install_emptydir/test.json
+++ b/test cases/common/248 install_emptydir/test.json
diff --git a/test cases/common/247 install_symlink/datafile.dat b/test cases/common/249 install_symlink/datafile.dat
index ff3104b..ff3104b 100644
--- a/test cases/common/247 install_symlink/datafile.dat
+++ b/test cases/common/249 install_symlink/datafile.dat
diff --git a/test cases/common/247 install_symlink/meson.build b/test cases/common/249 install_symlink/meson.build
index ae30382..ae30382 100644
--- a/test cases/common/247 install_symlink/meson.build
+++ b/test cases/common/249 install_symlink/meson.build
diff --git a/test cases/common/247 install_symlink/test.json b/test cases/common/249 install_symlink/test.json
index 33aa76e..33aa76e 100644
--- a/test cases/common/247 install_symlink/test.json
+++ b/test cases/common/249 install_symlink/test.json
diff --git a/test cases/failing/106 feature require.bis/meson.build b/test cases/failing/107 feature require.bis/meson.build
index 08c099c..08c099c 100644
--- a/test cases/failing/106 feature require.bis/meson.build
+++ b/test cases/failing/107 feature require.bis/meson.build
diff --git a/test cases/failing/106 feature require.bis/meson_options.txt b/test cases/failing/107 feature require.bis/meson_options.txt
index 5910a87..5910a87 100644
--- a/test cases/failing/106 feature require.bis/meson_options.txt
+++ b/test cases/failing/107 feature require.bis/meson_options.txt
diff --git a/test cases/failing/106 feature require.bis/test.json b/test cases/failing/107 feature require.bis/test.json
index 2583990..2583990 100644
--- a/test cases/failing/106 feature require.bis/test.json
+++ b/test cases/failing/107 feature require.bis/test.json
diff --git a/test cases/failing/107 no build get_external_property/meson.build b/test cases/failing/108 no build get_external_property/meson.build
index 8a4215c..8a4215c 100644
--- a/test cases/failing/107 no build get_external_property/meson.build
+++ b/test cases/failing/108 no build get_external_property/meson.build
diff --git a/test cases/failing/107 no build get_external_property/test.json b/test cases/failing/108 no build get_external_property/test.json
index b95427e..d2827f4 100644
--- a/test cases/failing/107 no build get_external_property/test.json
+++ b/test cases/failing/108 no build get_external_property/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/107 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting"
+ "line": "test cases/failing/108 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting"
}
]
}
diff --git a/test cases/failing/108 enter subdir twice/meson.build b/test cases/failing/109 enter subdir twice/meson.build
index 9343233..9343233 100644
--- a/test cases/failing/108 enter subdir twice/meson.build
+++ b/test cases/failing/109 enter subdir twice/meson.build
diff --git a/test cases/failing/108 enter subdir twice/sub/meson.build b/test cases/failing/109 enter subdir twice/sub/meson.build
index d036a3f..d036a3f 100644
--- a/test cases/failing/108 enter subdir twice/sub/meson.build
+++ b/test cases/failing/109 enter subdir twice/sub/meson.build
diff --git a/test cases/failing/108 enter subdir twice/test.json b/test cases/failing/109 enter subdir twice/test.json
index 0a8e127..f7a526c 100644
--- a/test cases/failing/108 enter subdir twice/test.json
+++ b/test cases/failing/109 enter subdir twice/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/108 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited."
+ "line": "test cases/failing/109 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited."
}
]
}
diff --git a/test cases/failing/109 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build
index dd22f56..dd22f56 100644
--- a/test cases/failing/109 invalid fstring/meson.build
+++ b/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build
diff --git a/test cases/failing/109 invalid fstring/test.json b/test cases/failing/111 invalid fstring/109 invalid fstring/test.json
index 71d8f59..71d8f59 100644
--- a/test cases/failing/109 invalid fstring/test.json
+++ b/test cases/failing/111 invalid fstring/109 invalid fstring/test.json
diff --git a/test cases/failing/110 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/meson.build
index 973df30..973df30 100644
--- a/test cases/failing/110 invalid fstring/meson.build
+++ b/test cases/failing/111 invalid fstring/meson.build
diff --git a/test cases/failing/110 invalid fstring/test.json b/test cases/failing/111 invalid fstring/test.json
index bfd0e2d..89ec40c 100644
--- a/test cases/failing/110 invalid fstring/test.json
+++ b/test cases/failing/111 invalid fstring/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/110 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable."
+ "line": "test cases/failing/111 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable."
}
]
}
diff --git a/test cases/failing/111 compiler argument checking/meson.build b/test cases/failing/112 compiler argument checking/meson.build
index bb1f447..bb1f447 100644
--- a/test cases/failing/111 compiler argument checking/meson.build
+++ b/test cases/failing/112 compiler argument checking/meson.build
diff --git a/test cases/failing/111 compiler argument checking/test.json b/test cases/failing/112 compiler argument checking/test.json
index f41f2d2..f4728db 100644
--- a/test cases/failing/111 compiler argument checking/test.json
+++ b/test cases/failing/112 compiler argument checking/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/111 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\""
+ "line": "test cases/failing/112 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\""
}
]
}
diff --git a/test cases/failing/112 empty fallback/meson.build b/test cases/failing/113 empty fallback/meson.build
index f4eb5fe..f4eb5fe 100644
--- a/test cases/failing/112 empty fallback/meson.build
+++ b/test cases/failing/113 empty fallback/meson.build
diff --git a/test cases/failing/112 empty fallback/subprojects/foo/meson.build b/test cases/failing/113 empty fallback/subprojects/foo/meson.build
index c9e134b..c9e134b 100644
--- a/test cases/failing/112 empty fallback/subprojects/foo/meson.build
+++ b/test cases/failing/113 empty fallback/subprojects/foo/meson.build
diff --git a/test cases/failing/112 empty fallback/test.json b/test cases/failing/113 empty fallback/test.json
index 89520ef..c8ed212 100644
--- a/test cases/failing/112 empty fallback/test.json
+++ b/test cases/failing/113 empty fallback/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/112 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake"
+ "line": "test cases/failing/113 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake"
}
]
}
diff --git a/test cases/failing/113 cmake executable dependency/meson.build b/test cases/failing/114 cmake executable dependency/meson.build
index bfb03ef..bfb03ef 100644
--- a/test cases/failing/113 cmake executable dependency/meson.build
+++ b/test cases/failing/114 cmake executable dependency/meson.build
diff --git a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt
index 0067879..0067879 100644
--- a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt
+++ b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt
diff --git a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c
index 9b6bdc2..9b6bdc2 100644
--- a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c
+++ b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c
diff --git a/test cases/failing/113 cmake executable dependency/test.json b/test cases/failing/114 cmake executable dependency/test.json
index 1cb4a0f..82306dd 100644
--- a/test cases/failing/113 cmake executable dependency/test.json
+++ b/test cases/failing/114 cmake executable dependency/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/113 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead."
+ "line": "test cases/failing/114 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead."
}
]
}
diff --git a/test cases/failing/114 allow_fallback with fallback/meson.build b/test cases/failing/115 allow_fallback with fallback/meson.build
index 2874e42..2874e42 100644
--- a/test cases/failing/114 allow_fallback with fallback/meson.build
+++ b/test cases/failing/115 allow_fallback with fallback/meson.build
diff --git a/test cases/failing/114 allow_fallback with fallback/test.json b/test cases/failing/115 allow_fallback with fallback/test.json
index 1e5712e..6bdcc51 100644
--- a/test cases/failing/114 allow_fallback with fallback/test.json
+++ b/test cases/failing/115 allow_fallback with fallback/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/114 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive"
+ "line": "test cases/failing/115 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive"
}
]
}
diff --git a/test cases/failing/115 nonsensical bindgen/meson.build b/test cases/failing/116 nonsensical bindgen/meson.build
index 6995f67..6995f67 100644
--- a/test cases/failing/115 nonsensical bindgen/meson.build
+++ b/test cases/failing/116 nonsensical bindgen/meson.build
diff --git a/test cases/failing/115 nonsensical bindgen/src/header.h b/test cases/failing/116 nonsensical bindgen/src/header.h
index 750621f..750621f 100644
--- a/test cases/failing/115 nonsensical bindgen/src/header.h
+++ b/test cases/failing/116 nonsensical bindgen/src/header.h
diff --git a/test cases/failing/115 nonsensical bindgen/src/source.c b/test cases/failing/116 nonsensical bindgen/src/source.c
index d652d28..d652d28 100644
--- a/test cases/failing/115 nonsensical bindgen/src/source.c
+++ b/test cases/failing/116 nonsensical bindgen/src/source.c
diff --git a/test cases/failing/115 nonsensical bindgen/test.json b/test cases/failing/116 nonsensical bindgen/test.json
index d9249b2..b0a38e8 100644
--- a/test cases/failing/115 nonsensical bindgen/test.json
+++ b/test cases/failing/116 nonsensical bindgen/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/115 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target"
+ "line": "test cases/failing/116 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target"
}
]
}
diff --git a/test cases/failing/116 run_target in test/meson.build b/test cases/failing/117 run_target in test/meson.build
index db7cb30..db7cb30 100644
--- a/test cases/failing/116 run_target in test/meson.build
+++ b/test cases/failing/117 run_target in test/meson.build
diff --git a/test cases/failing/116 run_target in test/test.json b/test cases/failing/117 run_target in test/test.json
index 961c1e4..ad24367 100644
--- a/test cases/failing/116 run_target in test/test.json
+++ b/test cases/failing/117 run_target in test/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/116 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]"
+ "line": "test cases/failing/117 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]"
}
]
}
diff --git a/test cases/failing/116 run_target in test/trivial.c b/test cases/failing/117 run_target in test/trivial.c
index 96612d4..96612d4 100644
--- a/test cases/failing/116 run_target in test/trivial.c
+++ b/test cases/failing/117 run_target in test/trivial.c
diff --git a/test cases/failing/117 run_target in add_install_script/meson.build b/test cases/failing/118 run_target in add_install_script/meson.build
index 9d37a39..9d37a39 100644
--- a/test cases/failing/117 run_target in add_install_script/meson.build
+++ b/test cases/failing/118 run_target in add_install_script/meson.build
diff --git a/test cases/failing/117 run_target in add_install_script/test.json b/test cases/failing/118 run_target in add_install_script/test.json
index fec1941..a09b1a3 100644
--- a/test cases/failing/117 run_target in add_install_script/test.json
+++ b/test cases/failing/118 run_target in add_install_script/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/117 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\""
+ "line": "test cases/failing/118 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\""
}
]
}
diff --git a/test cases/failing/117 run_target in add_install_script/trivial.c b/test cases/failing/118 run_target in add_install_script/trivial.c
index 1b14571..1b14571 100644
--- a/test cases/failing/117 run_target in add_install_script/trivial.c
+++ b/test cases/failing/118 run_target in add_install_script/trivial.c
diff --git a/test cases/failing/118 pathsep in install_symlink/meson.build b/test cases/failing/119 pathsep in install_symlink/meson.build
index cce82c2..cce82c2 100644
--- a/test cases/failing/118 pathsep in install_symlink/meson.build
+++ b/test cases/failing/119 pathsep in install_symlink/meson.build
diff --git a/test cases/failing/118 pathsep in install_symlink/test.json b/test cases/failing/119 pathsep in install_symlink/test.json
index e3f3a4a..9df546a 100644
--- a/test cases/failing/118 pathsep in install_symlink/test.json
+++ b/test cases/failing/119 pathsep in install_symlink/test.json
@@ -1,7 +1,7 @@
{
"stdout": [
{
- "line": "test cases/failing/118 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir."
+ "line": "test cases/failing/119 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir."
}
]
}
diff --git a/test cases/frameworks/13 yelp/help/C/index2.page b/test cases/frameworks/13 yelp/help/C/index2.page
new file mode 100644
index 0000000..14b6b51
--- /dev/null
+++ b/test cases/frameworks/13 yelp/help/C/index2.page
@@ -0,0 +1,8 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ xmlns:its="http://www.w3.org/2005/11/its"
+ type="guide"
+ id="index2">
+ <title>
+ Hello!
+ </title>
+</page>
diff --git a/test cases/frameworks/13 yelp/help/C/index3.page b/test cases/frameworks/13 yelp/help/C/index3.page
new file mode 100644
index 0000000..c0c21c1
--- /dev/null
+++ b/test cases/frameworks/13 yelp/help/C/index3.page
@@ -0,0 +1,8 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ xmlns:its="http://www.w3.org/2005/11/its"
+ type="guide"
+ id="index3">
+ <title>
+ Hello!
+ </title>
+</page>
diff --git a/test cases/frameworks/13 yelp/help/meson.build b/test cases/frameworks/13 yelp/help/meson.build
index c8edd61..d6dbe10 100644
--- a/test cases/frameworks/13 yelp/help/meson.build
+++ b/test cases/frameworks/13 yelp/help/meson.build
@@ -8,14 +8,14 @@ gnome.yelp('meson',
)
gnome.yelp('meson-symlink',
- sources: 'index.page',
+ sources: 'index2.page',
media: 'media/test.txt',
symlink_media: true,
languages: ['de', 'es'],
)
gnome.yelp('meson-linguas',
- sources: 'index.page',
+ sources: 'index3.page',
media: 'media/test.txt',
symlink_media: false,
)
diff --git a/test cases/frameworks/13 yelp/test.json b/test cases/frameworks/13 yelp/test.json
index ffe75cb..22e34d2 100644
--- a/test cases/frameworks/13 yelp/test.json
+++ b/test cases/frameworks/13 yelp/test.json
@@ -6,17 +6,17 @@
{"type": "file", "file": "usr/share/help/es/meson/media/test.txt"},
{"type": "file", "file": "usr/share/help/de/meson/index.page"},
{"type": "file", "file": "usr/share/help/de/meson/media/test.txt"},
- {"type": "file", "file": "usr/share/help/C/meson-symlink/index.page"},
+ {"type": "file", "file": "usr/share/help/C/meson-symlink/index2.page"},
{"type": "file", "file": "usr/share/help/C/meson-symlink/media/test.txt"},
+ {"type": "file", "file": "usr/share/help/es/meson-symlink/index2.page"},
{"type": "file", "file": "usr/share/help/es/meson-symlink/media/test.txt"},
- {"type": "file", "file": "usr/share/help/es/meson-symlink/index.page"},
- {"type": "file", "file": "usr/share/help/de/meson-symlink/index.page"},
+ {"type": "file", "file": "usr/share/help/de/meson-symlink/index2.page"},
{"type": "file", "file": "usr/share/help/de/meson-symlink/media/test.txt"},
- {"type": "file", "file": "usr/share/help/C/meson-linguas/index.page"},
+ {"type": "file", "file": "usr/share/help/C/meson-linguas/index3.page"},
{"type": "file", "file": "usr/share/help/C/meson-linguas/media/test.txt"},
+ {"type": "file", "file": "usr/share/help/es/meson-linguas/index3.page"},
{"type": "file", "file": "usr/share/help/es/meson-linguas/media/test.txt"},
- {"type": "file", "file": "usr/share/help/es/meson-linguas/index.page"},
- {"type": "file", "file": "usr/share/help/de/meson-linguas/index.page"},
+ {"type": "file", "file": "usr/share/help/de/meson-linguas/index3.page"},
{"type": "file", "file": "usr/share/help/de/meson-linguas/media/test.txt"}
],
"skip_on_jobname": ["azure", "cygwin", "macos", "msys2"]
diff --git a/test cases/unit/99 custom target name/file.txt.in b/test cases/unit/100 custom target name/file.txt.in
index e69de29..e69de29 100644
--- a/test cases/unit/99 custom target name/file.txt.in
+++ b/test cases/unit/100 custom target name/file.txt.in
diff --git a/test cases/unit/99 custom target name/meson.build b/test cases/unit/100 custom target name/meson.build
index 8d148a8..8d148a8 100644
--- a/test cases/unit/99 custom target name/meson.build
+++ b/test cases/unit/100 custom target name/meson.build
diff --git a/test cases/unit/99 custom target name/subdir/meson.build b/test cases/unit/100 custom target name/subdir/meson.build
index 785a7b3..785a7b3 100644
--- a/test cases/unit/99 custom target name/subdir/meson.build
+++ b/test cases/unit/100 custom target name/subdir/meson.build
diff --git a/test cases/unit/99 relative find program/foo.py b/test cases/unit/101 relative find program/foo.py
index 21239b7..21239b7 100755
--- a/test cases/unit/99 relative find program/foo.py
+++ b/test cases/unit/101 relative find program/foo.py
diff --git a/test cases/unit/99 relative find program/meson.build b/test cases/unit/101 relative find program/meson.build
index 5745d8a..5745d8a 100644
--- a/test cases/unit/99 relative find program/meson.build
+++ b/test cases/unit/101 relative find program/meson.build
diff --git a/test cases/unit/99 relative find program/subdir/meson.build b/test cases/unit/101 relative find program/subdir/meson.build
index 475f5f5..475f5f5 100644
--- a/test cases/unit/99 relative find program/subdir/meson.build
+++ b/test cases/unit/101 relative find program/subdir/meson.build
diff --git a/test cases/unit/100 rlib linkage/lib2.rs b/test cases/unit/102 rlib linkage/lib2.rs
index 3487bc5..3487bc5 100644
--- a/test cases/unit/100 rlib linkage/lib2.rs
+++ b/test cases/unit/102 rlib linkage/lib2.rs
diff --git a/test cases/unit/100 rlib linkage/main.rs b/test cases/unit/102 rlib linkage/main.rs
index d0f82e4..d0f82e4 100644
--- a/test cases/unit/100 rlib linkage/main.rs
+++ b/test cases/unit/102 rlib linkage/main.rs
diff --git a/test cases/unit/100 rlib linkage/meson.build b/test cases/unit/102 rlib linkage/meson.build
index 2d15b2a..2d15b2a 100644
--- a/test cases/unit/100 rlib linkage/meson.build
+++ b/test cases/unit/102 rlib linkage/meson.build
diff --git a/test cases/unit/101 python without pkgconfig/meson.build b/test cases/unit/103 python without pkgconfig/meson.build
index b3a0c42..b3a0c42 100644
--- a/test cases/unit/101 python without pkgconfig/meson.build
+++ b/test cases/unit/103 python without pkgconfig/meson.build
diff --git a/test cases/unit/97 link full name/.gitignore b/test cases/unit/98 link full name/.gitignore
index 8129601..8129601 100644
--- a/test cases/unit/97 link full name/.gitignore
+++ b/test cases/unit/98 link full name/.gitignore
diff --git a/test cases/unit/97 link full name/libtestprovider/meson.build b/test cases/unit/98 link full name/libtestprovider/meson.build
index 128c213..128c213 100644
--- a/test cases/unit/97 link full name/libtestprovider/meson.build
+++ b/test cases/unit/98 link full name/libtestprovider/meson.build
diff --git a/test cases/unit/97 link full name/libtestprovider/provider.c b/test cases/unit/98 link full name/libtestprovider/provider.c
index 5e79966..5e79966 100644
--- a/test cases/unit/97 link full name/libtestprovider/provider.c
+++ b/test cases/unit/98 link full name/libtestprovider/provider.c
diff --git a/test cases/unit/97 link full name/proguser/meson.build b/test cases/unit/98 link full name/proguser/meson.build
index 5be5bc9..5be5bc9 100644
--- a/test cases/unit/97 link full name/proguser/meson.build
+++ b/test cases/unit/98 link full name/proguser/meson.build
diff --git a/test cases/unit/97 link full name/proguser/receiver.c b/test cases/unit/98 link full name/proguser/receiver.c
index 65e9d8e..65e9d8e 100644
--- a/test cases/unit/97 link full name/proguser/receiver.c
+++ b/test cases/unit/98 link full name/proguser/receiver.c
diff --git a/test cases/unit/98 install all targets/bar-custom.txt b/test cases/unit/99 install all targets/bar-custom.txt
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/bar-custom.txt
+++ b/test cases/unit/99 install all targets/bar-custom.txt
diff --git a/test cases/unit/98 install all targets/bar-devel.h b/test cases/unit/99 install all targets/bar-devel.h
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/bar-devel.h
+++ b/test cases/unit/99 install all targets/bar-devel.h
diff --git a/test cases/unit/98 install all targets/bar-notag.txt b/test cases/unit/99 install all targets/bar-notag.txt
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/bar-notag.txt
+++ b/test cases/unit/99 install all targets/bar-notag.txt
diff --git a/test cases/unit/98 install all targets/custom_files/data.txt b/test cases/unit/99 install all targets/custom_files/data.txt
index 557db03..557db03 100644
--- a/test cases/unit/98 install all targets/custom_files/data.txt
+++ b/test cases/unit/99 install all targets/custom_files/data.txt
diff --git a/test cases/unit/98 install all targets/foo.in b/test cases/unit/99 install all targets/foo.in
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/foo.in
+++ b/test cases/unit/99 install all targets/foo.in
diff --git a/test cases/unit/98 install all targets/foo1-devel.h b/test cases/unit/99 install all targets/foo1-devel.h
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/foo1-devel.h
+++ b/test cases/unit/99 install all targets/foo1-devel.h
diff --git a/test cases/unit/98 install all targets/lib.c b/test cases/unit/99 install all targets/lib.c
index 2ea9c7d..2ea9c7d 100644
--- a/test cases/unit/98 install all targets/lib.c
+++ b/test cases/unit/99 install all targets/lib.c
diff --git a/test cases/unit/98 install all targets/main.c b/test cases/unit/99 install all targets/main.c
index 0fb4389..0fb4389 100644
--- a/test cases/unit/98 install all targets/main.c
+++ b/test cases/unit/99 install all targets/main.c
diff --git a/test cases/unit/98 install all targets/meson.build b/test cases/unit/99 install all targets/meson.build
index 94bd1fe..94bd1fe 100644
--- a/test cases/unit/98 install all targets/meson.build
+++ b/test cases/unit/99 install all targets/meson.build
diff --git a/test cases/unit/98 install all targets/script.py b/test cases/unit/99 install all targets/script.py
index c5f3be9..c5f3be9 100644
--- a/test cases/unit/98 install all targets/script.py
+++ b/test cases/unit/99 install all targets/script.py
diff --git a/test cases/unit/98 install all targets/subdir/bar2-devel.h b/test cases/unit/99 install all targets/subdir/bar2-devel.h
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/subdir/bar2-devel.h
+++ b/test cases/unit/99 install all targets/subdir/bar2-devel.h
diff --git a/test cases/unit/98 install all targets/subdir/foo2.in b/test cases/unit/99 install all targets/subdir/foo2.in
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/subdir/foo2.in
+++ b/test cases/unit/99 install all targets/subdir/foo2.in
diff --git a/test cases/unit/98 install all targets/subdir/foo3-devel.h b/test cases/unit/99 install all targets/subdir/foo3-devel.h
index e69de29..e69de29 100644
--- a/test cases/unit/98 install all targets/subdir/foo3-devel.h
+++ b/test cases/unit/99 install all targets/subdir/foo3-devel.h
diff --git a/test cases/unit/98 install all targets/subdir/lib.c b/test cases/unit/99 install all targets/subdir/lib.c
index 2ea9c7d..2ea9c7d 100644
--- a/test cases/unit/98 install all targets/subdir/lib.c
+++ b/test cases/unit/99 install all targets/subdir/lib.c
diff --git a/test cases/unit/98 install all targets/subdir/main.c b/test cases/unit/99 install all targets/subdir/main.c
index 0fb4389..0fb4389 100644
--- a/test cases/unit/98 install all targets/subdir/main.c
+++ b/test cases/unit/99 install all targets/subdir/main.c
diff --git a/test cases/unit/98 install all targets/subdir/meson.build b/test cases/unit/99 install all targets/subdir/meson.build
index 53c796a..53c796a 100644
--- a/test cases/unit/98 install all targets/subdir/meson.build
+++ b/test cases/unit/99 install all targets/subdir/meson.build
diff --git a/test cases/unit/98 install all targets/subdir/script.py b/test cases/unit/99 install all targets/subdir/script.py
index c5f3be9..c5f3be9 100644
--- a/test cases/unit/98 install all targets/subdir/script.py
+++ b/test cases/unit/99 install all targets/subdir/script.py
diff --git a/tools/dircondenser.py b/tools/dircondenser.py
index 2a726df..fa299e9 100755
--- a/tools/dircondenser.py
+++ b/tools/dircondenser.py
@@ -81,6 +81,8 @@ def condense(dirname: str) -> None:
os.chdir(curdir)
replace_source('run_unittests.py', replacements)
replace_source('run_project_tests.py', replacements)
+ for f in glob('unittests/*.py'):
+ replace_source(f, replacements)
if __name__ == '__main__':
if len(sys.argv) != 1:
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index b176aa5..8b3181e 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -3830,7 +3830,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertEqual(sorted(link_args), sorted(['-flto']))
def test_install_tag(self) -> None:
- testdir = os.path.join(self.unit_test_dir, '98 install all targets')
+ testdir = os.path.join(self.unit_test_dir, '99 install all targets')
self.init(testdir)
self.build()
@@ -3952,7 +3952,7 @@ class AllPlatformTests(BasePlatformTests):
do_install(None, expected_all, 2)
def test_introspect_install_plan(self):
- testdir = os.path.join(self.unit_test_dir, '98 install all targets')
+ testdir = os.path.join(self.unit_test_dir, '99 install all targets')
introfile = os.path.join(self.builddir, 'meson-info', 'intro-install_plan.json')
self.init(testdir)
self.assertPathExists(introfile)
@@ -4139,7 +4139,7 @@ class AllPlatformTests(BasePlatformTests):
}}
''')
- testdir = os.path.join(self.unit_test_dir, '100 rlib linkage')
+ testdir = os.path.join(self.unit_test_dir, '102 rlib linkage')
gen_file = os.path.join(testdir, 'lib.rs')
with open(gen_file, 'w') as f:
f.write(template.format(0))
@@ -4159,7 +4159,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIn('exit status 39', cm.exception.stdout)
def test_custom_target_name(self):
- testdir = os.path.join(self.unit_test_dir, '99 custom target name')
+ testdir = os.path.join(self.unit_test_dir, '100 custom target name')
self.init(testdir)
out = self.build()
if self.backend is Backend.ninja:
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
index 8ff0f8e..594e9f0 100644
--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -1334,7 +1334,7 @@ class LinuxlikeTests(BasePlatformTests):
see: https://github.com/mesonbuild/meson/issues/9000
https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a
'''
- testdir = os.path.join(self.unit_test_dir, '97 link full name','libtestprovider')
+ testdir = os.path.join(self.unit_test_dir, '98 link full name','libtestprovider')
oldprefix = self.prefix
# install into installdir without using DESTDIR
installdir = self.installdir
@@ -1347,7 +1347,7 @@ class LinuxlikeTests(BasePlatformTests):
self.new_builddir()
env = {'LIBRARY_PATH': os.path.join(installdir, self.libdir),
'PKG_CONFIG_PATH': os.path.join(installdir, self.libdir, 'pkgconfig')}
- testdir = os.path.join(self.unit_test_dir, '97 link full name','proguser')
+ testdir = os.path.join(self.unit_test_dir, '98 link full name','proguser')
self.init(testdir,override_envvars=env)
# test for link with full path
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py
index 25f3b1a..c5e5233 100644
--- a/unittests/platformagnostictests.py
+++ b/unittests/platformagnostictests.py
@@ -32,7 +32,7 @@ class PlatformAgnosticTests(BasePlatformTests):
Tests that find_program() with a relative path does not find the program
in current workdir.
'''
- testdir = os.path.join(self.unit_test_dir, '99 relative find program')
+ testdir = os.path.join(self.unit_test_dir, '101 relative find program')
self.init(testdir, workdir=testdir)
def test_invalid_option_names(self):
@@ -68,5 +68,5 @@ class PlatformAgnosticTests(BasePlatformTests):
interp.process(fname)
def test_python_dependency_without_pkgconfig(self):
- testdir = os.path.join(self.unit_test_dir, '101 python without pkgconfig')
+ testdir = os.path.join(self.unit_test_dir, '103 python without pkgconfig')
self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'})