Dylan Baker
d1b52b913f
interpreter: split keyword definitions out of the interpreter
2021-08-04 19:09:08 -04:00
Jussi Pakkanen
4703f4c244
Merge pull request #8992 from dcbaker/submit/modernize-python-module-dependency
...
Cleanup the python module
2021-07-22 01:16:24 +03:00
Xavier Claessens
0183954ea1
Fix meson.version().version_compare() regression in subproject
2021-07-21 13:33:06 -04:00
Dylan Baker
a881e849b5
modules/python: simplify a number of interfaces
...
Including not calling back into `Interpreter.func_*`, which is not a
good idea both from a type saftey and perforamance point of view.
Instead there's now a shared _impl method
2021-07-13 16:43:14 -07:00
Dylan Baker
f459c0e918
interpreter: remove stringArgs uses
...
It's only used now on a files that always raises an exception anyway,
might as well just not do any checking and reduces the uses of that
function
2021-07-07 11:21:12 -07:00
Dylan Baker
52c68ca6fe
interpreter: use typed_pos_args for files
2021-07-07 11:21:05 -07:00
Dylan Baker
011f13bcdc
interpreter: use typed_pos_args for add_langauges
2021-07-07 11:21:05 -07:00
Dylan Baker
011b58d75f
interpreter: use typed_pos_args for project
2021-07-07 11:21:05 -07:00
Dylan Baker
015e44014a
interpreter: use typed_pos_args for subdir
2021-07-07 11:21:05 -07:00
Dylan Baker
3f6afa2693
interpreter: use typed_pos_args for assert
2021-07-07 11:21:05 -07:00
Dylan Baker
2486938011
interpreter: use typed_pos_args for subproject
2021-07-07 11:21:04 -07:00
Dylan Baker
9f07a1ad41
interpreter: use typed_pos_args for get_option
2021-07-07 11:21:04 -07:00
Dylan Baker
6f6db0f2e3
interpreter: use typed_pos_args configuration_data
2021-07-07 11:21:04 -07:00
Dylan Baker
982973f303
interpreter: use typed_pos_args for alias_target
2021-07-07 11:21:04 -07:00
Dylan Baker
09d7da19c1
interpreter: use typed_kwargs for include_directories
2021-07-07 11:21:03 -07:00
Dylan Baker
3135b130b8
interpreter: use typed_pos_args for include_directories
2021-07-07 11:20:43 -07:00
Dylan Baker
5aed9dd939
interpreter: use typed_pos_args for add_test_setup
2021-07-07 11:20:43 -07:00
Dylan Baker
e71a6544c5
interpreter: use typed_pos_args for join_paths
2021-07-07 11:20:43 -07:00
Dylan Baker
9ecd578167
interpreter: use typed_pos_args for set_variable
2021-07-07 11:20:43 -07:00
Dylan Baker
20c5dfe869
interpreter: use typed_pos_args for get_variable
2021-07-07 11:20:41 -07:00
Dylan Baker
4d05f9d64b
interpreter: use typed_pos_args for is_variable
2021-07-07 11:20:07 -07:00
Dylan Baker
30a9bb60ee
interpreter: use typed_pos_args for is_disabler
2021-07-07 11:20:07 -07:00
Eli Schwartz
bd6f46e723
condense lines
2021-07-05 17:55:04 +03:00
Eli Schwartz
dd31891c1f
more f-strings too complex to be caught by pyupgrade
2021-07-05 17:55:04 +03:00
Jussi Pakkanen
ec5baa62c8
Merge pull request #8950 from dcbaker/submit/import-required-disabled
...
Add required and disabled to import, modules.found method
2021-07-03 14:00:47 +03:00
Daniel Mensinger
971a0b1775
fix: get_variable default variables are not ObjectHolders ( fixes #8936 )
2021-07-02 17:14:44 +03:00
Dylan Baker
bc4201a7f1
interpreter: add required and disabled to import
...
This is useful both from the perspective of optional functionality that
requires a module, and also as I continue to progress with Meson++,
which will probably not implement all of the modules that Meson itself
does.
2021-06-30 16:28:14 -07:00
Dylan Baker
4a0a6a8083
modules: modules need to return either an ExtensionModlue or a
...
NewExtensionModule object
So that we get the found() method.
2021-06-30 14:07:26 -07:00
Dylan Baker
351a1e9ec9
interpreter: use typed_pos_args for func_import
...
and make the helper method private
2021-06-30 12:46:33 -07:00
Simon Ser
1f3adc4dbe
Add feed arg to custom_target()
2021-06-29 20:54:13 +03:00
Daniel Mensinger
3e396b3782
fix: Always explicitly set encoding for text files ( fixes #8263 )
2021-06-29 11:28:08 +02:00
Daniel Mensinger
8f7343831b
refactor: Refactor BothLibraries logic
...
This commit introduces a new type of `HoldableObject`: The
`SecondLevelHolder`. The primary purpose of this class is
to handle cases where two (or more) `HoldableObject`s are
stored at the same time (with one default object). The
best (and currently only) example here is the `BothLibraries`
class.
2021-06-26 12:49:35 +02:00
Daniel Mensinger
3f889606c7
Split compiler detection from Environment
...
This moves all the compiler detection logic into the new
compilers.detect module. This dramatically reduces the size
and complexity of Environment.
2021-06-25 19:34:48 +02:00
Xavier Claessens
0bef89b0c2
interpreter: Empty list used to be allowed in install_headers/man
...
That change introduced when porting to @typed_pos_args breaks gtk4. We
could decide to deprecate/warn but should not error for backward
compatibility.
2021-06-23 10:15:00 -04:00
Jussi Pakkanen
6e0a0fd1da
Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functions
...
Add annotations for the various install_* functions
2021-06-23 01:00:59 +03:00
Jussi Pakkanen
0e5f88baf4
Merge pull request #8912 from mensinda/fixBothLibraries
...
Fix `BothLibraries` processing
2021-06-23 00:54:58 +03:00
Daniel Mensinger
0c4dd81c4d
fix: Handling BothLibraries objects ( fixes #8907 )
2021-06-22 21:09:19 +02:00
Jussi Pakkanen
39f25ec6aa
Merge pull request #8905 from mensinda/refactorFix
...
fix: Fix set_variable not holderifying (fixes #8904 )
2021-06-22 21:26:38 +03:00
Dylan Baker
d636b92c1a
install_*: FileMode doesn't need to be None
...
There's no reason to allow None into the backend, it already has code to
check that all of the values of the FileMode object are None, so let's
use that, which is much simpler all the way down.
2021-06-22 09:13:41 -07:00
Dylan Baker
7213b7d81f
interpreter: use typed_kwargs for install_man
2021-06-22 09:13:41 -07:00
Dylan Baker
7619f31f71
interpreter: man sections can be up to 9 on many platforms
...
Linux and FreeBSD use section 9 for kernel man pages, so we should allow
that.
2021-06-22 09:13:41 -07:00
Dylan Baker
9611bd8244
interpreter: use typed_pos_args for install_man
2021-06-22 09:13:41 -07:00
Dylan Baker
f4d2efbed3
interpreter: use typed_kwargs for install_headers
2021-06-22 09:13:41 -07:00
Dylan Baker
251dff56fb
interpreter: use typed_pos_args for install_headers
2021-06-22 09:13:41 -07:00
Dylan Baker
ea3d85a1c0
interpreter: use typed_kwargs for install_data
2021-06-22 09:13:41 -07:00
Dylan Baker
a551e76137
interpreter: use typed_pos_args for install_data
2021-06-22 09:13:41 -07:00
Dylan Baker
596c8d4af5
interpreter: use typed_kwargs for install_subdir
2021-06-22 09:12:54 -07:00
Dylan Baker
3d940fec98
interpreter: use typed_pos_args for install_subdir
2021-06-22 09:12:54 -07:00
Dylan Baker
a024f432dd
interpreter: add overload for source_strings_to_files
...
when only passing strings or Files we only get back Files. This is
useful for the install_* methods
2021-06-22 09:12:54 -07:00
Laurin-Luis Lehning
d5ed8f61a5
interpreter: Move argument checks from add_*_arguments to compiler.get_supported_arguments
2021-06-21 09:15:13 +02:00