Jussi Pakkanen
e69b9c982c
Update instructions on installing with Pip. Closes #9034 .
3 years ago
Jussi Pakkanen
3f380b8e1d
Fix duplicated frameworks in the Xcode backend.
3 years ago
Jussi Pakkanen
85d102bc6e
Fix multiple generators in target in Xcode.
3 years ago
Jussi Pakkanen
267d5385d4
Path special casing for the Xcode backend.
3 years ago
Jussi Pakkanen
12e7b3afcf
Handle .C extension in Xcode.
3 years ago
Dylan Baker
e0ab7290f0
unittests: Ensure that symlink is removed after tests complete
...
using `TestCase.addCleanup` is both neat and tidy, and also ensures that
the cleanup will be done, even if the test fails.
3 years ago
Jussi Pakkanen
3d98d54fc5
Merge pull request #9012 from dcbaker/submit/qt-custom-targets
...
Qt module generated sources
3 years ago
Dylan Baker
a0e2de02bf
run_mypy: add backends/backends
3 years ago
Dylan Baker
dffa93b853
backend/backends: use a TypedDict for introspection data
...
Which is easier to reason about as a human, and narrower, allowing for
more accurate type checking.
3 years ago
Dylan Baker
f6f35aa906
backend/backends: Add type annotations to Backend
3 years ago
Dylan Baker
24284fd9d5
backend/backends: Add verbose to ExecutableSerialisiation initializer
...
There are cases in the backend like this:
```python
e = ExecutableSerialisation(...)
e.verbose = v
```
setting it from the initializer is cleaner.
3 years ago
Dylan Baker
a5b6b35edb
backend/backends: Add type annotations to ExecutableSerilalisation
3 years ago
Dylan Baker
6785504b53
backend/backends: Add type annotations to SubdirInstallData
3 years ago
Dylan Baker
ccab6d9c84
backend/backends: Add type annotations to TargetInstallData
3 years ago
Dylan Baker
9fb19ed923
backend/backends: Add type annotations to CleanTrees
3 years ago
Dylan Baker
2664153d24
backend/backends: add type annotations to RegenInfo
3 years ago
Dylan Baker
b2684a9887
backends/xcode: remove unused compiler parameter from escape_extra_args
3 years ago
Dylan Baker
0ca0e6116c
backends: remove unused name parameter from as_meson_exe_cmdline
...
This parameter isn't used, at all, so just remove it
3 years ago
Dylan Baker
2a70c039bf
ninjabackend: add missing type annotation
...
I needed to figure this out for the purposes of annotating CleanTrees
anyway.
3 years ago
Dylan Baker
0bc77c604f
backends: move method from ninjabackend to base class
...
The baseclass has code that assumes said method exists, and it really
doesn't seem to do anything ninja specific, so move it to the generic
backend.
3 years ago
Dylan Baker
a3c94956c8
compilers: Add get_no_warn_args to the base Compiler class
...
Because it should be defined there.
3 years ago
Dylan Baker
abababfb93
interpreterobjects: fix Test annotations
3 years ago
Dylan Baker
4d6f15b1f1
environment: add annotations and fix get_meson_command
...
It is theoretically possible for the command to be None so we should
handle that.
3 years ago
Dylan Baker
b7ebccd257
environment: add some missing annotations
3 years ago
Dylan Baker
c52b454b69
mesonlib: Fix typing of substitute_values
...
This is really, really, annoying. What we really want is (psuedocode):
```python
class SubValues(TypedDict[str, str], total=False):
@INPUT@: T.List[str]
@OUTPUT@: T.List[str]
```
Which would specifiy that `@INPUT@` and `@OUTPUT@` *may* be present and
if they are, then they are lists. There may be additional keys, which
have a single string as a value. Of course there is currently no way to
do that with typing, so we have to instead take a union type and then
use asserts to help the type checker unerstand this.
More info: https://github.com/python/mypy/issues/4617
3 years ago
Dylan Baker
0f5f265a16
mesonlib: Add an exception for what should be unreachable code
...
It gives us a little more saftey, and makes pylance happy.
3 years ago
Dylan Baker
a5c4cf3a3f
mesonlib: Fix type annotations
...
get_compiler_for_source and classify_unity_sources are both wrong, in
that they expect to be given a seqence of strings, but they really
should take a `Sequence[str | File]`.
Additionally, they're using `CompilerType`, which we don't need anymore,
and should stop using, most methods for the Compiler are actually
defined in the base compiler class.
3 years ago
Dylan Baker
3a45c5a7ce
build: Add type annotations to Target.get_debug_filename
3 years ago
Dylan Baker
e938ffb763
build: Add annotations to the CustomTargetIndex class
...
These are not complete, and are just enough for backends/backends.py
3 years ago
Dylan Baker
c9e827a6a1
build: Add a `name` property to CustomTargetIndex
...
This is needed to make CustomTargetIndex polymorphic with Target derived
classes, and is used in the build module.
3 years ago
Dylan Baker
d754ee1a7f
build: Fix CustomTarget initializer annotation
...
the `output` parameter is a string, not an int.
3 years ago
Dylan Baker
e08f896802
build: Add a couple of annotations to RunTarget
3 years ago
Dylan Baker
cd7d602f33
build: Add type annotations for CustomTarget
...
Again, this is not complete and is just enough for backend.py. Again,
typing these is complicated massively by the layering violations in the
Target classes and the interpreter.
3 years ago
Dylan Baker
b7d5ecc298
build: type get_import_filenames
3 years ago
Dylan Baker
f21c50223b
build: Add some type annotations to BuildTarget
...
This is not complete, it's just enough for backend/backend.py. A more
completely typing would be more difficult, especially whithout
untangling the layering violation between the build targets and the
interpreter.
3 years ago
Dylan Baker
225022abf6
build: Add type annotations for ExtractedObjects
3 years ago
Dylan Baker
65d5d9e20c
build: Add missing annotations for Build.get_* methods
...
The underlying attributes are typed properly, but the getters are not
3 years ago
Dylan Baker
3467cf956c
build: fix annotation for Build.targets
...
This really does need to be an OrderedDict, not a MutableMapping, as
there are consumers in the backend that need dictionary only methods.
3 years ago
Dylan Baker
e3b2d4ac8b
build: add annotation for build.postconf_scripts
3 years ago
Dylan Baker
adddb9af21
backends/vs: add a missing annotation
3 years ago
Xavier Claessens
12e5bfbc1c
external-project: Add support for WAF build system
...
Fixes : #7638
3 years ago
Jussi Pakkanen
e2f4126e41
Merge pull request #9126 from dcbaker/submit/rust-use-full-typing
...
Fully type check rust.bindgen
3 years ago
Dylan Baker
42d27f05c6
docs: add snippet for qt compile_ method generated inputs
3 years ago
Dylan Baker
a7f3703440
modules/qt: Allow using generated sources for compile_translations ts_files
3 years ago
Dylan Baker
a16335a958
modules/qt: Allow Generated sources in compile_resources
3 years ago
Dylan Baker
ff573620b0
modules/qt: allow passing generated targets to compile_ui
3 years ago
Dylan Baker
965fcf2883
modules/qt: Allow generated sources for arguemnts to compile_moc
3 years ago
Dylan Baker
35dbf7e6d4
interpreter: fix overload for `source_strings_to_files`
3 years ago
Eli Schwartz
1f46b4ce64
tests: python module should install files correctly
...
- default to python site-packages
- subdir to site-packages/subdir
- arbitrary install_dir
3 years ago
Eli Schwartz
b0ffb80ecf
python module: fix extensions without explicit subdir being installed to libdir
...
They are documented to go in site-packages, and indeed belong there.
Regression from the initial implementation via commit ad296976f0
Fixes #6331
3 years ago