aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-20Update instructions on installing with Pip. Closes #9034.pipdocJussi Pakkanen1-12/+14
2021-08-20unittests: Ensure that symlink is removed after tests completeDylan Baker1-3/+7
using `TestCase.addCleanup` is both neat and tidy, and also ensures that the cleanup will be done, even if the test fails.
2021-08-20Merge pull request #9012 from dcbaker/submit/qt-custom-targetsJussi Pakkanen3-46/+114
Qt module generated sources
2021-08-20run_mypy: add backends/backendsDylan Baker1-0/+1
2021-08-20backend/backends: use a TypedDict for introspection dataDylan Baker1-1/+11
Which is easier to reason about as a human, and narrower, allowing for more accurate type checking.
2021-08-20backend/backends: Add type annotations to BackendDylan Baker1-147/+223
2021-08-20backend/backends: Add verbose to ExecutableSerialisiation initializerDylan Baker1-1/+2
There are cases in the backend like this: ```python e = ExecutableSerialisation(...) e.verbose = v ``` setting it from the initializer is cleaner.
2021-08-20backend/backends: Add type annotations to ExecutableSerilalisationDylan Baker1-3/+12
2021-08-20backend/backends: Add type annotations to SubdirInstallDataDylan Baker1-1/+2
2021-08-20backend/backends: Add type annotations to TargetInstallDataDylan Baker1-3/+6
2021-08-20backend/backends: Add type annotations to CleanTreesDylan Baker1-1/+1
2021-08-20backend/backends: add type annotations to RegenInfoDylan Baker1-1/+1
2021-08-20backends/xcode: remove unused compiler parameter from escape_extra_argsDylan Baker1-2/+1
2021-08-20backends: remove unused name parameter from as_meson_exe_cmdlineDylan Baker4-10/+7
This parameter isn't used, at all, so just remove it
2021-08-20ninjabackend: add missing type annotationDylan Baker1-1/+1
I needed to figure this out for the purposes of annotating CleanTrees anyway.
2021-08-20backends: move method from ninjabackend to base classDylan Baker2-8/+8
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.
2021-08-20compilers: Add get_no_warn_args to the base Compiler classDylan Baker1-0/+4
Because it should be defined there.
2021-08-20interpreterobjects: fix Test annotationsDylan Baker1-3/+6
2021-08-20environment: add annotations and fix get_meson_commandDylan Baker1-3/+7
It is theoretically possible for the command to be None so we should handle that.
2021-08-20environment: add some missing annotationsDylan Baker1-5/+5
2021-08-20mesonlib: Fix typing of substitute_valuesDylan Baker1-5/+27
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
2021-08-20mesonlib: Add an exception for what should be unreachable codeDylan Baker1-0/+2
It gives us a little more saftey, and makes pylance happy.
2021-08-20mesonlib: Fix type annotationsDylan Baker1-5/+4
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.
2021-08-20build: Add type annotations to Target.get_debug_filenameDylan Baker1-2/+2
2021-08-20build: Add annotations to the CustomTargetIndex classDylan Baker1-5/+4
These are not complete, and are just enough for backends/backends.py
2021-08-20build: Add a `name` property to CustomTargetIndexDylan Baker1-0/+4
This is needed to make CustomTargetIndex polymorphic with Target derived classes, and is used in the build module.
2021-08-20build: Fix CustomTarget initializer annotationDylan Baker1-1/+1
the `output` parameter is a string, not an int.
2021-08-20build: Add a couple of annotations to RunTargetDylan Baker1-1/+2
2021-08-20build: Add type annotations for CustomTargetDylan Baker1-12/+11
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.
2021-08-20build: type get_import_filenamesDylan Baker1-2/+2
2021-08-20build: Add some type annotations to BuildTargetDylan Baker1-24/+21
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.
2021-08-20build: Add type annotations for ExtractedObjectsDylan Baker1-11/+18
2021-08-20build: Add missing annotations for Build.get_* methodsDylan Baker1-4/+4
The underlying attributes are typed properly, but the getters are not
2021-08-20build: fix annotation for Build.targetsDylan Baker1-2/+2
This really does need to be an OrderedDict, not a MutableMapping, as there are consumers in the backend that need dictionary only methods.
2021-08-20build: add annotation for build.postconf_scriptsDylan Baker1-2/+2
2021-08-20backends/vs: add a missing annotationDylan Baker1-1/+1
2021-08-20external-project: Add support for WAF build systemXavier Claessens4-27/+53
Fixes: #7638
2021-08-19Merge pull request #9126 from dcbaker/submit/rust-use-full-typingJussi Pakkanen2-31/+39
Fully type check rust.bindgen
2021-08-18docs: add snippet for qt compile_ method generated inputsDylan Baker1-0/+13
2021-08-18modules/qt: Allow using generated sources for compile_translations ts_filesDylan Baker2-5/+14
2021-08-18modules/qt: Allow Generated sources in compile_resourcesDylan Baker2-30/+51
2021-08-18modules/qt: allow passing generated targets to compile_uiDylan Baker2-4/+12
2021-08-18modules/qt: Allow generated sources for arguemnts to compile_mocDylan Baker2-7/+24
2021-08-18interpreter: fix overload for `source_strings_to_files`Dylan Baker1-0/+3
2021-08-18tests: python module should install files correctlyEli Schwartz7-3/+51
- default to python site-packages - subdir to site-packages/subdir - arbitrary install_dir
2021-08-18python module: fix extensions without explicit subdir being installed to libdirEli Schwartz1-4/+4
They are documented to go in site-packages, and indeed belong there. Regression from the initial implementation via commit ad296976f079cd185ab7361e3e4b18c6bf684090 Fixes #6331
2021-08-18test runner: add the ability to configure test.json for python pathsEli Schwartz3-2/+32
Adds new installed file types with @VAR@ substitution.
2021-08-18python module: make external program wrapper have access to useful metadataEli Schwartz1-26/+35
Basically just reorganize code. Try to make it a little neater, while we're at it.
2021-08-18Fix incorrect .name attribute for python programEli Schwartz1-3/+4
It is always set to python3 even if we asked for python2...
2021-08-18fix some confusingly indirect codeEli Schwartz1-3/+3
rsplit(..., 1) always produces exactly one split, by design, there's no need to then join a 1-element list via a generator comprehension after extracting the end of it via pop. If this commit message sounds confusing, then so was I when trying to figure out what this actually did and if it needed extracting to PythonExternalModule.