Eli Schwartz
a0d28e850e
properly error out when project version is an array other than files()
...
Due to the support for specifying version as files('VERSION'), we need
to internally accept an array, since that is what files() returns.
Before that, we didn't accept arrays, and after that, we don't intend to
accept generic arrays, only arrays as a side effect of files(). So
tighten the typechecking to ensure that that is what we actually get.
3 years ago
Dylan Baker
4f40962a05
interpreterobjects: Don't warn on set10(bool)
...
Python inherited a really bad design from C, booleans happen to be ints.
Which is awful, but it's true.
Fixes : #9858
3 years ago
andy5995
a00ede432f
Contributing.md:specify max line length for docs
...
I thought it would good to specify a general rule here so people can set
their line wrapping appropriately.
[skip ci]
3 years ago
andy5995
14d811f647
Subprojects.md:add extra detail
...
This adds a link
https://mesonbuild.com/Builtin-options.html#specifying-options-per-subproject
in two different places and provides an example for changing the default
options.
This info is partially based on a [recent
discussion](https://github.com/mesonbuild/meson/discussions/9830 )
between me and @eli-schwartz
[skip ci]
3 years ago
Daniel Mensinger
7ab2ceb273
cmake: require CMake 3.19 to get rid of Whitelist restrictions
3 years ago
Daniel Mensinger
42843c4cf6
cmake: Add TARGET_ generator expression support ( fixes #9305 )
3 years ago
Daniel Mensinger
99aae9b4df
cmake: Move generator expression evaluation to the end of the traceparser
3 years ago
andy5995
baff6bccac
Subprojects.md:add link to is_subproject()
3 years ago
Eli Schwartz
603244b059
fix broken version annotations for the new itstool_join feature
...
It was not added in 0.61.0 as that was already released.
3 years ago
Jussi Pakkanen
4316b71017
Merge pull request #9742 from ximion/wip/itstool
...
i18n: Add support for joining XML localization via itstool
3 years ago
Matthias Klumpp
02fb0c3f8b
i18n: Add support for joining XML localization via itstool
3 years ago
Eli Schwartz
2a99252604
python module: only find a pkg-config dependency from the found python
...
If the found python returns None from sysconfig.get_config_var('LIBPC')
then we cannot (and don't) set PKG_CONFIG_LIBDIR from it. In fact, we
can virtually guarantee we won't find a PkgConfigDependency either,
because any python that doesn't have a LIBPC is presumably not installed
to the system pkg-config directory (maybe it's an isolated relocatable
install, maybe it just doesn't have pkg-config support for who knows
what reason).
Trying to find one anyway using pkg-config's builtin search paths can
unexpectedly succeed, though, by finding a completely unrelated python
installation installed to a system location, which isn't the one we are
actually building for.
Instead, return early so that we use the system dependency class
fallback.
While we are at it, add back the debug messages from #3989 which got
removed.
3 years ago
Dylan Baker
acef5a9762
modules/gnome: make some methods static
...
Since they don't use the instance or class state, they should be static
methods.
3 years ago
Dylan Baker
9b04257847
run_mypy: add gnome module
3 years ago
Dylan Baker
d96bc73b99
modules/gnome: fix remaining typing errors
...
Which is one incorrect type annotation, and a couple of instances of
concatenating lists of unlike types. List being invariant is super
annoying.
3 years ago
Dylan Baker
99c835b2b9
modules/gnome: fix annotation to type that isn't defined
3 years ago
Dylan Baker
26722f8e44
modules/gnome: fix _get_build_args type annotations
3 years ago
Dylan Baker
0dd720a014
modules/gnome: fix _make_typelib_target types
3 years ago
Dylan Baker
68e684d51f
modules/gnome: Fix typing with _get_dependencies_flags and
...
_get_gir_target_deps
The typing issues with these are tightly intertwined, so it didn't
really make sense to solve them independently
3 years ago
Dylan Baker
214ce0dc8b
build: Fix return types of a couple of methods
...
These don't return `Target`, they return `BuildTarget | CustomTarget |
CustomTargetIndex`
3 years ago
Dylan Baker
a848dd3cce
modules/gnome: fix issues with _make_gir_target
3 years ago
Dylan Baker
fcf78ceb7b
modules/gnome: fix declared type of list
3 years ago
Dylan Baker
f85629e374
modules/gnome: use T.Sequence instead of T.List
...
Which is pretty much necessary to make anything involving unions of
lists work
3 years ago
Dylan Baker
cd6e2c85a7
modules/gnome: use itertools.chain instead of list concatenation
...
This is better as it avoids building unnecessary lists, and two fixes
the typing issue from concatenating lists of different types.
3 years ago
Dylan Baker
216435b2ae
dependencies: fix libraries and whole_libraries types
...
gnome points out that CustomTargets can be linked with, so we should
allow that.
3 years ago
Dylan Baker
41fe51b36e
modules/gnome: ignore the return type of _get_dep
...
This is hard to fix, and it's really doing something bad anyway. But we
know it's right, so just tell mypy to not worry about it.
3 years ago
Dylan Baker
4048c71d6d
modules/gnome: fix type annotations and issues with _gather_typelib_includes_and_update_depends
...
There is the problem of the annotations themselves, then there is
the problem with depends being mutated. The mutation side effect is a
problem in itself, but there's also the problem that we really want to
use Sequence, which isn't mutable.
3 years ago
Dylan Baker
dacba7a83d
modules/gnome: define and annotate all instance variables in the initializer
3 years ago
Dylan Baker
ce5f56f266
build: Fix annotations to RunTarget and AliasTarget
...
RunTargets and AliasTargets may depend on RunTargets, so annotate them
that way. The Gnome module relies on this internally.
3 years ago
Dylan Baker
9c7ddf59fe
interpreterobjects: deprecated passing a number to configuration_data.set10
...
This is currently allowed, and is used in at least a few projects. It
was not intended to work or documented, but it does and since it is in
use a full deprecation period must be used. A warning has also been
added for values < 0, which have surprising behavior.
3 years ago
Dylan Baker
bf3fa728fa
interpreterobjects: remove no-flattening from configuraiton_data.get
...
It's no longer required because we don't allow arrays as fallbacks
anymore.
3 years ago
Dylan Baker
f16956a951
interpreterobjects: don't allow keyword arguments in configuration_data.keys
...
Which do nothing, and shouldn't be allowed.
3 years ago
Dylan Baker
5074e2d3b5
interpreter: replace ConfigurationDataObject with ConfigurationDataHolder
...
This is much cleaner, and more in line with the way we handle
interpreter objects in modern meson practice
3 years ago
Dylan Baker
23af9e4c1a
build: move configuration_data initial value handling to build.ConfigurationData
...
It really belongs here, not in the interpreter
3 years ago
Dylan Baker
5c979eb21f
interpreterobjects: clean up ConfigurationData initializer
3 years ago
Dylan Baker
574525673f
interpreterobjects: use typed_* for configuration_data.set*
...
This removes the ability to use ConfigurationData as a dict, but
restricting the inputs to `str | int | bool`. This may be a little too
soon for this, and we may want to wait on that part, it's only bee 8
months since we started warning about this.
3 years ago
Dylan Baker
7641bfd0ce
interpreterobjects: use typed_* with configuration_data.merge_from
3 years ago
Dylan Baker
f7cbe89a13
interpreterobjects: use typed_* with configuration_data.get_unquoted
3 years ago
Dylan Baker
baa9ecb1c4
interpreterobjects: use typed_args for configuration_data.get
3 years ago
Dylan Baker
65558445ae
interpreterobjects: use typed_pos_args and noKwargs for configuration.data.has
3 years ago
Dylan Baker
1ff2abcd9c
interpreterobjects: use typed_kwargs for dependency.get_variable
3 years ago
Dylan Baker
1751dc4701
interpreterobjects: use typed_kwargs for dependency.get_pkgconfig_variable
3 years ago
Dylan Baker
6b272973e0
dependencies: don't pass kwargs from get_pkgconfig_variable
...
This is a layering violation, we're relying on the way the interpreter
handles keyword arguments. Instead, pass them as free variables,
destructuring in the interpreter
3 years ago
Dylan Baker
ab9c0c1735
interpreterobjects: use typed_kwargs for FeatureOption.require
3 years ago
Dylan Baker
55055c3e0e
interpreterobjects: use typed_pos_args for FeatureOpotion
3 years ago
Dylan Baker
6ad772cb37
interpreterobjects: use typed_pos_args for dependency.as_system_method
3 years ago
Dylan Baker
7537ec3299
interpreterobjects: use typed_pos_args for dependency.get_configtool_variable
3 years ago
Dylan Baker
0fa3436645
interpreterobjects: use typed_pos_args for dependency.get_pkgconfig_variable
3 years ago
Dylan Baker
482ab09a95
interpreterobjects: consistently use dependency. for error messages
...
We currently use a mixture of dependency, Dependency, and dep
3 years ago
Eli Schwartz
4b9ec4f6d5
wraps: implement exponential backoff for downloading files
...
Implementation modeled after mesonlib.windows_proof_rmtree().
Implements the other half of #9688
3 years ago