Xavier Claessens
d3d95d39be
gnome: add update_desktop_database to post_install()
2021-06-23 15:48:32 -04:00
Xavier Claessens
39c6571a46
gnome: Set GSETTINGS_SCHEMA_DIR in devenv
2021-06-23 15:48:32 -04:00
Daniel Mensinger
0c4dd81c4d
fix: Handling BothLibraries objects ( fixes #8907 )
2021-06-22 21:09:19 +02:00
Daniel Mensinger
7c757dff71
holders: Fix the remaining code to respect the holder changes
2021-06-18 23:48:33 +02:00
Daniel Mensinger
34c28dc92c
holders: remove unholder
2021-06-18 23:48:33 +02:00
Daniel Mensinger
84a3e459a8
holders: Introduce BothLibraries
2021-06-18 23:48:33 +02:00
Dylan Baker
79fec1ce4e
modules/qt: use append rather than extend in preprocess
...
Because that's what we need, of course
2021-06-18 09:52:23 -07:00
Dylan Baker
f7eda0e822
modules/qt: allow string values for include_directories
...
This should have been supported before, but wasn't.
2021-06-18 09:52:23 -07:00
Eli Schwartz
bbcc91c1e5
expose SystemDependency and BuiltinDependency as toplevel classes
...
mesonbuild.dependencies.__init__ exposes configtool, pkgconfig, cmake
and more in __init__.py, so there's no reason we should be tying
SystemDependency to the internal organization implementation of the
subpackage!
In the 2nd previous commit it took quite some effort to figure out that
the python module "does not exist" because of import errors while
refactoring something completely different.
2021-06-17 13:22:25 -04:00
Eli Schwartz
493dc6ed10
move base class for system dependencies into base.py
...
In accordance with review comments; it's small enough this seems fitting.
2021-06-17 13:22:25 -04:00
Jussi Pakkanen
6fb2f86379
Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-module
...
Rewrite the Qt module for type safety!
2021-06-16 20:11:46 +03:00
Dylan Baker
bfaa529a7a
modules/qt: sort and clean up dependencies
2021-06-15 12:48:53 -07:00
Dylan Baker
2a8a6bb881
modules/qt: Return GeneratedListHolder instead of GeneratedList
...
This really shouldn't be necissary, but fixing the typing annotations of
ModuleReturnValue is much harder than just returning the Holder
directly.
2021-06-15 12:48:53 -07:00
Dylan Baker
c422621317
interpreterobjects|build: use typed_kwargs for generator.process
2021-06-15 12:48:53 -07:00
Dylan Baker
2043461b87
build: Pass name of generator to initializer
...
It's really a property of the Generator what name to use, not something
that should be passed to each call to process files.
2021-06-15 12:48:53 -07:00
Dylan Baker
35bdaada1d
interpreter|build: Do Generator keyword argument checking in the interpreter
...
For qt we already have all of the necissary checking in place. Now in
the interpreter we have the same, the intrperter does all of the
checking, then passed the arguments to the Generator initializer, which
just assigns the passed values. This is nice, neat, and clean and fixes
the layering violatino between build and interpreter.
2021-06-15 12:48:53 -07:00
Dylan Baker
d2c1ab40a0
interpreter|build: Pass just the executable down to Generator
...
This requires that the interpreter has done the validation, which it now
does at all callsites. This simplifies the Generator initializer.
2021-06-15 12:48:53 -07:00
Dylan Baker
d064466e8b
modues/qt: Make use of typed_kwargs since/deprecation abiltiy
2021-06-15 12:48:52 -07:00
Dylan Baker
3824e30f7a
modules/qt: fix remaining typing issues and add to run_mypy
...
This just ignores the fact taht Generator is unchecked. Generator needs
some real love in terms of type checking.
2021-06-15 12:36:05 -07:00
Dylan Baker
3c4c7d0429
modules/qt: use type checking and annotations for compile_translations
2021-06-15 12:36:05 -07:00
Dylan Baker
2bc7a1b3da
modules/qt: fully annotate and check qt.has_tools
2021-06-15 12:36:05 -07:00
Dylan Baker
61ddceb3b9
modules/qt: Make use of the default=[] availability
2021-06-15 12:36:02 -07:00
Dylan Baker
ffa83f7f8a
modules/qt: Type anotations and cleanups
...
This adds a number of missing type annotations to existing functions,
and makes a few members protected instead of public, as they were never
meant to be public
2021-06-15 12:35:15 -07:00
Dylan Baker
ce3a7ec19d
modules: pass all proxied arguments
2021-06-15 12:35:15 -07:00
Dylan Baker
e23f78141a
modules: Fix type annotation imports
2021-06-15 12:35:15 -07:00
Dylan Baker
118f70fede
modules/qt: have pre-process dispatch to moc_compile
...
for ode sharing and simplicity
2021-06-15 12:35:15 -07:00
Dylan Baker
2322804a4d
modules/qt: Add a compile_moc method
...
This method only compiles moc resources, nothing else
2021-06-15 12:35:15 -07:00
Dylan Baker
ec592a4eca
modules/qt: use the compile_ui method inside the preprocess method
...
for code deduplication
2021-06-15 12:35:15 -07:00
Dylan Baker
fcdb0f9879
modules/qt: Add a compile_ui method
...
Which is the same functionality split out of preprocess
2021-06-15 12:35:15 -07:00
Dylan Baker
ed06ae3db1
modules/qt: Dispatch the preprocess method to the compile_resources method
...
Which removes code duplication and makes our testing better
2021-06-15 12:35:15 -07:00
Dylan Baker
d27948b1dc
modules/qt: Add a `compile_resources` method
...
This is a separate method for just handling qrc resources.
2021-06-15 12:35:15 -07:00
Dylan Baker
4575ed3d31
modules/qt: Deprecated the preprocess sources keyword argument
2021-06-15 12:35:15 -07:00
Dylan Baker
0fe3dc6571
modules/qt: Deprecated the *sources variadic argument to preproccess
...
It's confusing, and it's a duplicate of the `sources` keyword argument,
which has always existed.
2021-06-15 12:35:15 -07:00
Jussi Pakkanen
abf485ebc3
Merge pull request #8878 from dcbaker/submit/dependency-type-fixes
...
Fix System dependencies setting type_name instead of name
2021-06-15 19:55:36 +03:00
Dylan Baker
e2266e8708
interpreter: use typed_*args for test and benchmark
...
this also requires some changes to the Rust module, as it calls into the
test code.
2021-06-14 12:30:02 -07:00
Dylan Baker
86704261a7
interpreter: use typed_pos_args for func_test and func_benchmark
...
Requires a few small changes to the Rust module, as it calls `func_test`
2021-06-14 12:30:02 -07:00
Dylan Baker
203a548d60
dependencies: Use the SystemDependency
...
This fixes these dependencies, which currently return the name of the
dependency as the type.
Fixes #8877
2021-06-14 09:09:32 -07:00
Eli Schwartz
c3f5c2e745
cuda module: fully buy into new modules API
...
In commit 3340284805
the new ModuleObject
API got further updated to hide self.interpreter; at the time, the CUDA
module got transferred over to the wrapper which does provide it.
But it works fine without self.interpreter, so let's just use the best
base class.
2021-06-09 10:36:02 -04:00
Daniel Mensinger
95b70bcb97
deps: Split dependencies.base
...
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
2021-06-03 10:23:27 -07:00
Dylan Baker
201dc64226
add a couple more type annotations
2021-06-02 15:53:17 -07:00
Dylan Baker
6aef800ba8
modules/fs: Use typed_kwargs
2021-05-30 23:32:15 -07:00
Xavier Claessens
2fb24b18e1
unstable_external_project: Remove unused imports
2021-05-28 15:17:10 -04:00
Xavier Claessens
8abbc5cc5d
modules: Replace find_program_impl() by state.find_program()
2021-05-28 15:17:10 -04:00
Xavier Claessens
2e02ef6592
modules: Add methods dict everywhere
...
This fix calling random internal methods from meson.build as long as
they were not prefixed by underscore.
2021-05-28 15:17:10 -04:00
Xavier Claessens
a734bcfc83
modules: Stop using ModuleReturnValue where it's not needed
...
It is only needed in functions that need to add targets to the
interpreter.
2021-05-28 15:17:10 -04:00
Xavier Claessens
3340284805
modules: Stop using InterpreterObject
...
Custom objects returned by modules must be subclass of ModuleObject and
have the state argument in its methods.
Add MutableModuleObject base class for objects that needs to be deep
copied on assignation.
2021-05-28 15:17:10 -04:00
Xavier Claessens
723c5227a4
modules: Remove snippet methods
...
The only advantage they have is they have the interpreter in arguments,
but it's already available as self.interpreter. We should discourage
usage of the interpreter API and rely on ModuleState object instead in
the future.
This also lift the restriction that a module method cannot add build
targets, but that was not enforced for snippet methods anyway (and some
modules were doing it) and it's really loose restriction as it should
check for many other things if we wanted to make it consistent.
2021-05-28 15:17:10 -04:00
Dylan Baker
f1e053fa44
modules/gnome: Correctly handle generated sources for generate_gir
...
We need to pass any generated sources down the CustomTarget
inititalizers so that they will generate a dependency correctly,
otherwise we get race conditions.
2021-05-28 08:47:11 -04:00
Dylan Baker
f2ae92368a
interpreter: Add docstring and fix types of source_strings_to_files
2021-05-19 23:28:17 +03:00
Xavier Claessens
69a5c950a3
pkgconfig: Do not escape custom variables
...
We need to escape space in variables that gets into cflags or libs
because otherwise we cannot split compiler args when paths contains
spaces. But custom variables are unlikely to be path that gets used in
cflags/libs, and escaping them cause regression in GStreamer that use
space as separator in a list variable.
2021-05-18 18:03:37 -04:00