aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mintro.py
AgeCommit message (Collapse)AuthorFilesLines
2022-09-06Fix install_subdirs not showing up in intro-install_plan.jsonThomas Li1-1/+3
2022-08-22introspection: untangle install_plan implemetation, fix a bunch of wrong onesEli Schwartz1-2/+0
Generally plumb through the values of get_option() passed to install_dir, and use this to establish the install plan name. Fixes several odd cases, such as: - {datadir} being prepended to "share" or "include" - dissociating custom install directories and writing them out as {prefix}/share/foo or {prefix}/lib/python3.10/site-packages This is the second half of #9478 Fixes #10601
2022-07-03move various unused typing-only imports into type-checking blocksEli Schwartz1-3/+8
2022-07-03sort imports for neatnessEli Schwartz1-9/+7
2022-06-01ast: rename module constant to match PEP8 styleDylan Baker1-2/+2
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens1-3/+3
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-03-07Merge pull request #10043 from dcbaker/submit/type-checking-for-subprojectJussi Pakkanen1-1/+1
Add typing for subproject()
2022-03-07Fix default install tag for shared lib symlinksXavier Claessens1-6/+14
Versioned shared libraries should have .so file in devel, .so.1 and .so.1.2.3 in runtime. Fixes: #9811
2022-03-03interpreter: replace build_def_files with OrderedSetDylan Baker1-1/+1
We do a bunch of backbending to make sure we don't have duplicates, let's just use the right datastructure to begin with.
2021-10-14introspect: include choices for array optionsPaolo Bonzini1-0/+2
There was even a test covering this, but it did not fail due to a typo.
2021-10-04remove printf debuggingEli Schwartz1-1/+0
Why did this dumb thing of mine ever get committed???
2021-10-04use list unpacking to simplify for loop referencesEli Schwartz1-4/+5
2021-09-06mintro: add installed_planFilipe Laíns1-0/+31
Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-3/+3
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-2/+2
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-1/+1
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-03-04mintro: include the correct target filenames for flat layoutPaolo Bonzini1-2/+10
Fixes: #8408
2021-03-04mintro: fix flake8 issuesPaolo Bonzini1-1/+1
2021-02-22minstall: Add --skip-subprojects optionXavier Claessens1-8/+8
By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
2021-01-04mintro: fix mypy warningDylan Baker1-4/+4
The output of list_targets is a pretty horrific jumble of things. We really need a TypeDict to make this not so terrible we can't deal with it, so for now just use Any.
2021-01-04fix LGTM warningsDylan Baker1-1/+1
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-19/+23
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-26/+12
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04use OptionKey for compiler_optionsDylan Baker1-3/+4
2021-01-04use OptionKey for backend_optionsDylan Baker1-3/+2
2021-01-04use OptionKey for coredata.user_optionsDylan Baker1-1/+1
2020-12-14mintro: export functions to load the meson-info filesPaolo Bonzini1-17/+30
With the next patch, "meson test" will be using the targets introspection information. Provide helper functions to share bits of code between mintro.py and mtest.py.
2020-11-20use real pathlib moduleDylan Baker1-1/+1
We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger1-7/+17
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger1-1/+1
2020-10-01mesonlib: make OptionOverrideProxy a true MutableMappingDylan Baker1-1/+1
So that we can actually use it anyplace that an OptionDictType could be used. I've also done a bit optimizing/simplifying of the implementation. This is needed for cuda, as it returns an OptionOverrideProxy where we ask for an OptionDicType
2020-09-08typing: fix code reviewDaniel Mensinger1-1/+2
2020-09-08typing: more fixesDaniel Mensinger1-10/+9
2020-09-08typing: fully annotate mintro and mtestDaniel Mensinger1-12/+12
2020-09-04introspect: add test dependencies info to test/benchmark JSONPaolo Bonzini1-0/+1
Add the ids of any target that needs to be rebuilt before running the tests as computed by the backend, to the introspection data for tests and benchmarks. This also includes anything that appears on the test's command line. Without this information, IDEs must update the entire build before running any test. They can now instead selectively build the test executable itself and anything that is needed to run it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-01mconf/mintro: use authoritative list of options from coredataDylan Baker1-13/+1
This splits the directory options and non-directory options into two dicts, and then merges them later to maintain API.
2020-06-12mintro: typings again x2TheQwertiest1-1/+1
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-06-12mintro: more typing shenanigansTheQwertiest1-1/+1
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: typing fixTheQwertiest1-1/+1
2020-06-12mintro: enforced order for subcommandsTheQwertiest1-12/+14
2020-06-09Made --help options sortedTheQwertiest1-1/+1
2020-05-23ast: Add AST JSON printerDaniel Mensinger1-1/+7
2020-04-30Convert test protocol into an enumDylan Baker1-1/+1
This gives us better type safety, and will be important as we add more test methods
2020-04-20Compiler options per langJohn Ericson1-2/+9
A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
2020-03-08intro: List symlinks in installdata (fixes #6734)Daniel Mensinger1-3/+8
2020-03-02types: Annotate mparser.pyDaniel Mensinger1-2/+3
This also fixes that the keys in ArgumentNode.kwargs are all of the type BaseNode now. Before this commit, it was possible that both strings and Nodes where used as keys.
2020-02-06Make 'default_library' per-subproject builtin optionXavier Claessens1-2/+13
Currently it's just like if all builtin/base/compiler options are yielding. This patch makes possible to have non-yielding builtin options. The value in is overriden in this order: - Value from parent project - Value from subproject's default_options if set - Value from subproject() default_options if set - Value from command line if set
2020-01-28mintro: use interpreter data for buildsystem-files (fixes #6390)Daniel Mensinger1-13/+15
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-44/+44