Age | Commit message (Collapse) | Author | Files | Lines |
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
|
|
This uses a recursive descent parser + lexer to create an IR from cfg()
expressions, which it then converts into meson IR.
|
|
|
|
Do not quit from using pytest at all, when pytest is present, simply
because xdist isn't available. Even without xdist, pytest is still
useful.
There doesn't seem to be any particular reason to require xdist. It just
happens to have been implemented that way, back in commit
4200afc74d1e6ba6d117e900799d0d82a85bae8a when we originally added a
check to avoid pytest erroring out with unknown options when xdist
options are passed and xdist is not installed.
|
|
|
|
|
|
This adds a new category of tests that does not need to run on all
platforms during CI. For now only run them on Linux runners because they
are not the bottleneck.
|
|
|
|
Fixes #7288.
|
|
|
|
Cleanup the python module
|
|
resolve symlinks passed to -C
|
|
|
|
Nothing uses this anymore, so don't check for it.
|
|
|
|
We need to store the original filename as well as whether the wrap was
redirected in order to properly purge the redirected wrap.
|
|
This behavior is more inline with the rest of Meson
|
|
|
|
|
|
This moves all the compiler detection logic into the new
compilers.detect module. This dramatically reduces the size
and complexity of Environment.
|
|
Add annotations for the various install_* functions
|
|
|
|
This works just like OptionKey.evolve, pass new keyword arguments to
override old ones, otherwise the original versions are copied to the new
one.
|
|
|
|
|
|
|
|
|
|
The dependency lookup is a lot of complex code. This refactor it all
into a single file/class outside of interpreter main class. This new
design allows adding more fallbacks candidates in the future (e.g. using
cc.find_library()) but does not yet add any extra API.
|
|
Insteadf of qt4 referencing the Qt5 page, include the same content in
both.
|
|
This allows checking specific values that are added or deprecated, which
we do a surprising amount of. This works with both containers and scalar
values
|
|
For safety
|
|
|
|
Utility methods for feature objects
|
|
This is meant to allow simple type conversions to happen before the
interpreter function is called. This should simplify some cases like the
"native" keyword arugment that are booleans in the Meson DSL, but an
Enum in the implementation
|
|
This attribute is a callable that returns a string if the value is
invalid, otherwise None. This intended for cases like the `install_*`
function's `install_mode` paramater, which is either an int or the
string "preserve", which allows us to do nice things like:
```python
class Kwargs(TypedDict):
install_mode: T.Union[int, T.Literal['preserve']]
@typed_kwargs(
'foo', KwargInfo('install_mode', ...,
validator=lambda x: None if isinstance(x, int) or x == 'preserve' else 'must be the literal "preserve"),
)
def install_data(self, node, args, kwargs: 'Kwargs'):
...
```
In this case mypy *knows* that the string is preserve, as do we, and we
can simply do tests like:
```python
if kwargs['install_mode'] == 'preserve':
...
else:
# this is an int
```
|
|
it's what mock is for afterall
|
|
Fix the following Python error:
D:\a\1\s\run_unittests.py:6654: DeprecationWarning: invalid escape sequence \
self.assertEqual(libhello_nolib.get_pkgconfig_variable(escaped_var, {}), hello world)
Use a raw string literal.
|
|
It's really inconvenient to want a thing that is always a list, but not
be able to provide a default value of a list because of mutation. To
that end the typed_kwargs method now makes a shallow copy of the default
when using a `ContainerTypeInfo` as the type. This mean that using a
default of `[]` is perfectly safe.
|
|
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
|
|
|
|
|
|
|
|
Re-enable various tests on Cygwin
|
|
|
|
|
|
This partially reverts commit add502c6483bde9dc6a0ba80b3c79163304465a4.
In 'linkshared' test, annotate cppfunc() as imported, so an indirection
through an import stub is generated, avoiding a relocation size error
when building using gcc for Cygwin with LTO on.
Align with the example of how to write this portably in [1].
The 'c' language part of that test already gets this right.
[1] http://gcc.gnu.org/wiki/Visibility
|
|
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.
|
|
|
|
|