aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
AgeCommit message (Collapse)AuthorFilesLines
2022-09-18gnome: Add some missing install_tagXavier Claessens1-0/+6
2022-09-12modules: Fix paths to (sub)project source/build directoriesDavid Ward2-5/+4
The subproject directory name (i.e. 'subprojects') was being added to the path even for the main project.
2022-09-12i18n: Fix source root in Gettext targets for subprojectsDavid Ward2-6/+10
Gettext should search for input files relative to the (sub)project source root, not the global source root. This change exposes a root_subdir member in ModuleState.
2022-09-07modules/wayland: Change default value of include_core_only to trueMark Bolhuis1-1/+1
The use of wayland-<client|server>.h is discouraged, therefore change the default value of include_core_only to true.
2022-09-07modules/wayland: Rename core_only to include_core_onlyMark Bolhuis1-3/+3
Rename the core_only option in scan_xml to include_core_only to match the flag used by wayland-scanner.
2022-09-06modules/wayland: Support --include-core-onlyMark Bolhuis1-1/+7
wayland-scanner can generate header files that only include wayland-client-core.h using a flag. Add a core_only option to scan_xml to support this use case.
2022-09-06Fix install_subdirs not showing up in intro-install_plan.jsonThomas Li1-0/+1
2022-08-31Fix 2 typos in a single string which can be shown in error messages.Jehan1-1/+1
2022-08-31modules/cmake: Fix typoaleksander1-1/+1
2022-08-26Fix indentation issues reported by flake8, requiring code restructuringAlf Henrik Sauge1-5/+9
Strictly speaking code restructuring isn't needed, but making this PEP8 compliant results in indentation of the code that reduces the readability. By moving the offending code on the outside of the method call, the readability is maintained.
2022-08-26Fix purely white space issues reported by flake8Alf Henrik Sauge3-12/+13
2022-08-25Revert "Windows: Improve Python 3.8+ module check on Windows"Eli Schwartz1-13/+1
This reverts commit 99ad11bd9c3249f548dda0b275d9f8dd1b3f6d14. This breaks working setups in conda. It is either wrong or incomplete and thus cannot be used. Fixes #10737
2022-08-22introspection: untangle install_plan implemetation, fix a bunch of wrong onesEli Schwartz1-8/+13
Generally plumb through the values of get_option() passed to install_dir, and use this to establish the install plan name. Fixes several odd cases, such as: - {datadir} being prepended to "share" or "include" - dissociating custom install directories and writing them out as {prefix}/share/foo or {prefix}/lib/python3.10/site-packages This is the second half of #9478 Fixes #10601
2022-08-18modules/pkgconfig: make it a NewExtensionModuleDylan Baker1-5/+5
Since we no longer need Interpreter.extract_variables, we can remove the interpreter from the module!
2022-08-18modules/pkgconfig: mypy clean!Dylan Baker1-22/+25
2022-08-18modules/pkgconfig: Fix code to handle CustomTarget and CustomTargetIndexDylan Baker1-3/+4
2022-08-18modules/pkgconfig: remove type checking abstractionDylan Baker1-8/+7
Which confuses the heck out of mypy
2022-08-18modules/pkgconfig: get rid of modifications to the BuildTarget objectsDylan Baker1-24/+40
This would tack on extra attributes for meta data tracking. Do that with our own datastructures instead
2022-08-18modules/pkgconfig: ensure "name" is not NoneDylan Baker1-2/+9
The name can be None if a library is not passed as a positional argument, and the name keyword argument is not provided. We shouldn't allow that to happen.
2022-08-18modules/pkgconfig: Get most type annotations addedDylan Baker1-50/+80
There are still a lot of errors here due to a mixture of really bad design (adding extra attributes to objects), and legitimate type errors (passing a str where a List[str] is expected). I suspect a lot of these cases aren't hit for some reason.
2022-08-18modules/pkgconfig: Use typed_kwargsDylan Baker1-58/+98
2022-08-18modules/pkgconfig: use typed_pos_argsDylan Baker1-8/+6
2022-08-18modules/pkgconfig: fix typo in blocked variableDylan Baker1-1/+1
require_private -> requires_private.
2022-08-18modules/pkgconfig: Fix some low hanging typing issuesDylan Baker1-18/+20
2022-08-18modules/fs: Replace configure_file(copy:) with fs.copyfileDylan Baker1-5/+60
`configure_file` is both an extremely complicated implementation, and a strange place for copying. It's a bit of a historical artifact, since the fs module didn't yet exist. It makes more sense to move this to the fs module and deprecate this `configure_file` version. This new version works at build time rather than configure time, which has the disadvantage it can't be passed to `run_command`, but with the advantage that changes to the input don't require a full reconfigure.
2022-08-17interpreter: move handling of module stability to interpreterDylan Baker6-0/+0
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of `unstable_foo.py`, which simplifies the import method a bit. This also allows for accurate FeatureNew/FeatureDeprecated use, as we know when the module was added and if/when it was stabilized.
2022-08-17modules: Add stabilization information to ModuleInfoDylan Baker8-7/+9
We're going to do more with this in the next commit, but this just adds the information for now. This allows the next commit have 100% mv changes for some of the modules, which makes review easier
2022-08-17modules: use module level information about new and deprecationDylan Baker24-48/+105
Instead of using FeatureNew/FeatureDeprecated in the module. The goal here is to be able to handle information about modules in a single place, instead of having to handle it separately. Each module simply defines some metadata, and then the interpreter handles the rest.
2022-08-04typing: simplify type annotations for librariesEli Schwartz1-3/+3
In a bunch of places we need to list various types of libraries including custom_target outputs, and it gets very long. Use a common T.Union for this.
2022-07-25qt module: correctly compare program name for lrelease versionEli Schwartz1-1/+1
(b, name) will always have the canonical tool name, not just a potentially weird bin path. We need to check stderr for qt4 tools other than lrelease, but we keyed off of the tool bin path, so matches were by no means guaranteed, and specifically, would fail if the tool is looked up via bindir. This really should always have checked the canonical name, which is guaranteed to be correct. Partial fix for #10443
2022-07-17modules/wayland: Add full type checkingDylan Baker1-9/+32
2022-07-08implement the new preserve_path kwarg for install_data tooEli Schwartz1-4/+10
Primarily interesting to me because it is then available for the python module's install_sources method. Based on the new feature in install_headers.
2022-07-06gnome module: Use --quiet to supress printing the link command lineRichard Hughes1-0/+1
This removes one line of stderr output per GObject Introspection file processed, e.g. g-ir-scanner: link: gcc -o Fwupd-2.0 Fwupd-2.0.o -L. -Wl,-rpath...
2022-07-06pkgconfig: do not add valgrind as requirementMarc-André Lureau1-0/+2
For the same reasons commit 7aa28456d ("Add dependency type for Valgrind") removed linking with valgrind, pkgconfig shouldn't generate "Requirements" for it, in general. This solves dbus meson port question/issue from: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/303#note_1444819 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-03move various unused typing-only imports into type-checking blocksEli Schwartz2-1/+3
2022-06-19python module: implicitly add python dep to extensionsEli Schwartz1-9/+19
If there isn't a preexisting dependency on python, append one. It's almost assuredly needed, so just do the right thing out of the box.
2022-06-19python module: cache dependency() lookup between invocationsEli Schwartz1-14/+26
Modeled similarly after the installations cache, but using the coredata dependency cache because it has a nice mechanism for handling the cache key.
2022-06-19gnome module: fix regression that broke using built xml files as gresourcesEli Schwartz1-1/+8
In commit 3dcc7125833cae138987aa4535c88dbd4dbd960d we moved to typed_pos_args. In the process, we deleted some code to specifically raise an error if you use custom_target or generator outputs, instead leaving it out of the typed pos args. However, that support was specifically supposed to be there. It was only an error in part of an if statement for handling old versions of glib-compile-resources. The specific error it calls out is that we need to manually parse the depfile at configure time, due to an external bug; obviously this is impossible if the gresource is only created at build time. Reinstate the original error message check, and allow built outputs to be used as compile_resources() inputs. Fixes #10367
2022-06-19Update CUDA Toolkit/driver version table for recent releases.Olexa Bilaniuk1-0/+5
Agrees with Release Notes, Section 1.1, Table 3. https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
2022-06-17external-project: Add depends kwargXavier Claessens1-5/+11
The unit test was racy but surprisingly never failed on CI. The reason is we need to ensure ninja build somelib.so before running `make` into the external project.
2022-06-17fix confusing incorrect default name for a KwargInfoEli Schwartz1-1/+1
We can use this lots of places, and it's always the same kwarg. There doesn't seem to be a point in naming it badly, then evolving it to the standard name in the one place it is currently used. This made it not shareable.
2022-06-17fix parameter expansion in several error messagesMichael Mera1-1/+1
At several points in the code base, f-strings are not correctly expanded due to missing 'f' string prefix. This fixes all the occurrences I could find.
2022-06-13flake8: don't use f-strings for strings without formattingEli Schwartz1-1/+1
2022-06-13flake8: fix various whitespace nitsEli Schwartz1-1/+2
2022-06-10treewide: various cleanups to move imports for mypy into typechecking blocksEli Schwartz1-1/+3
Along the way, add __future__ annotations where lacking.
2022-06-10flake8: remove no longer used importsEli Schwartz1-1/+0
2022-06-10wayland: Lookup for wayland-scanner using pkgconfigXavier Claessens3-43/+46
Just like some of glib tools, wayland-scanner can be defined in the pkgconfig dependency variables. Share code between gnome and wayland modules into ModuleState.
2022-06-01interpreter: use a shared KwargInfo for install_dirDylan Baker4-14/+14
CustomTarget allows multiple install dirs, while basically everything else allows only one. So this provides a shared instance for that.
2022-06-01modules/gnome: fix gen_marshall annotationDylan Baker1-1/+1
2022-06-01modules: move gnome targets into gnome moduleDylan Baker2-17/+17
They're not used outside of the gnome module anyway, and they create some annoying potentials for dependency loops