Commit Graph

9 Commits

Author SHA1 Message Date
Jussi Pakkanen ecd8c7e4af Update VS module version check. 2021-03-16 21:06:51 +02:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Xavier Claessens c8abede403 Windows Subsystem for Linux can run .exe without mono interpreter
Fixes: #8445
2021-03-03 08:05:00 -05:00
Dylan Baker b03039ec9d allow build.b_* options
These continue to be ignored as they always have, but no longer raise an
error.

Fixes: #8354
2021-02-18 10:57:20 -08:00
Dylan Baker 10d94a12b8 Environment: Fix passing envrionment variables CPPFLAGS and CFLAGS
Or other language flags that use CPPFLAGS (like CXXFLAGS). The problem
here is actually rather simple, `dict.setdefault()` doesn't work like I
thought it did, I thought it created a weak entry, but it actually is
equivalent to:
```python
if k not in dict:
    dict[k] = v
```
Instead we'll use an intermediate dictionary (a default dictionary
actually, since that makes things a little cleaner) and then add the
keys from that dict to self.options as applicable.

Test case written by Jussi, Fix by Dylan

Co-authored-by: Jussi Pakkanen
Fixes: #8361
Fixes: #8345
2021-02-17 14:46:15 +02:00
Dylan Baker 9cebd29da9 mesonlib: Add better errormessage to typelistify 2021-02-06 10:27:04 -08:00
Xavier Claessens fd572f32d8 Popen_safe: Fix stdout/stderr annotation 2021-01-29 11:06:16 -05:00
Volker-Weissmann 9e3bb9eea3
Warn about .C and .H files (#8249) 2021-01-26 00:06:31 +02:00
Dylan Baker 23d3b98fc1 split mesonlib into a package
Currently mesonlib does some import tricks to figure out whether it
needs to use windows or posix specific functions. This is a little
hacky, but works fine. However, the way the typing stubs are implemented
for the msvcrt and fnctl modules will cause mypy to fail on the other
platform, since the functions are not implemented.

To aleviate this (and for slightly cleaner design), I've split mesonlib
into a pacakge with three modules. A universal module contains all of
the platform agnositc code, a win32 module contains window specific
code, a posix module contains the posix specific code, and a platform
module contains no-op implementations. Then the package's __init__ file
imports all of the universal functions and all of the functions from the
approriate platform module, or the no-op versions as fallbacks. This
makes mypy happy, and avoids `if`ing all over the code to switch between
the platform specific code.
2021-01-23 12:48:29 +01:00