We went straight to the extra message, which when parsed as a subproject
string resulted in the Feature being entirely skipped because "project()
has not been parsed yet" as it could not find a subproject named that.
When input kwarg is missing in i18n.merge_file() it was crashing with a
backtrace because of kwargs['input'][0]. That code was useless anyway
because CustomTarget now uses first output as default name which is what
we need here.
Virtualenvs do not have their Python DLLs etc in the `sys.prefix`
directory, but in the `sys.base_prefix` directory. This directory is
the same as `sys.prefix` if not in a virtualenv, so is safe for either
case:
https://docs.python.org/3/library/sys.html#sys.base_prefix
We currently enable this only for rcc (where this really really matters)
but it can often matter for moc as well, and is just generally more
correct.
Really, this should have been added in #7451 too, but I neglected it
since the module warned about inaccurate dependencies only for rcc...
This removes the `packages` keyword argument, which was added in
80d665e8de, but beyond not warning about
unknown arguments has never done anything, and has never been
documented. The only users I could find were in our own test suite. If
someone is using this we can add it back with a deprecation warning.
Python is a whitespace significant language, changing indent level
implies that scope is changing. So when a string like
```python
def foo():
a = '''
somthing
'''
return a
```
It's visually misleading. Couple that with folding editors like vim
getting utterly confused by this, and it turns into a real pain. Using
textwrap.dedent allows us to get rid of that:
```python
def foo():
a = texwrap.dedent(
'''
something
''')
return a
```
But we still get the same result
There is no reason for these inititializers to exist, all they do is
defer to the parent initializer. Worse, since they are not type
annotated thy prevent the parent type annotations from being used
It turns out this could be missing in GResource*Target as well, due
mostly to the same problem, side effects of mutating a shared
dictionary; though it could also happen with a specific set of keywords
given and other omitted.
Fixes#9350
The `mkenums` functions can have this unset if, and only if, the
c file only variant is called. Due to side effects if the header file is
generated then `install_dir` is ensured to be set for the c file. I have
removed this side effect so that our tests actually cover this case.
Fixes#9472
We already have this magic string in mesonlib, and this should always
have used the cmake@ format which is identical to the meson format other
than the regex.
For example the OpenRC build files install libraries to install_dir: '/lib'
and this works, but causes the generated pkg-config to say:
prefix=/usr
Libs: -L${prefix}//lib
which is both ugly (double //) and resolves to /usr/lib which is exactly
what does not work.