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.
install_dir needs to be set to something, because CustomTarget expects
that. genmarshal still relies on CustomTarget setting it internally
itself.
Fixes#9350
Theere is no 'output' key in the kwargs, so if this was it it would
result in an exception. Mypy spotted this in a branch I'm working on
full typing for gnome, but since that seems unlikely to be done before
the 0.60 branchpoint I'd like to get this in sooner
If either 'name' or 'name_formatted' are absolute paths,
then they are of the form:
C:\path/to/file.ext (example)
By only substituting slashes with the underscore, we get:
C:_path_to_file.ext
This is still not quite right, infact os.path.basename()
returns:
_path_to_file.ext
Also replace colons with underscores to overcome issues when
absolute paths are involved.
Yelp currently can take sources two different ways, the first is via
variadic arguments, the second is by a keyword argument. If the keyword
is passed then the variadic arguments are silently ignored, which is
obviously not ideal. Fortunately the variadic form was never documented,
and is likely not in wide use.
This patch fixes it by deprecating the variadic form, and warning if
both are passed. It does not change behavior as someone may be relying
on it.