summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/unstable_external_project.py
AgeCommit message (Collapse)Author
2022-08-17interpreter: move handling of module stability to interpreterDylan Baker
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of `unstable_foo.py`, which simplifies the import method a bit. This also allows for accurate FeatureNew/FeatureDeprecated use, as we know when the module was added and if/when it was stabilized.
2022-08-17modules: Add stabilization information to ModuleInfoDylan Baker
We're going to do more with this in the next commit, but this just adds the information for now. This allows the next commit have 100% mv changes for some of the modules, which makes review easier
2022-08-17modules: use module level information about new and deprecationDylan Baker
Instead of using FeatureNew/FeatureDeprecated in the module. The goal here is to be able to handle information about modules in a single place, instead of having to handle it separately. Each module simply defines some metadata, and then the interpreter handles the rest.
2022-06-17external-project: Add depends kwargXavier Claessens
The unit test was racy but surprisingly never failed on CI. The reason is we need to ensure ninja build somelib.so before running `make` into the external project.
2022-04-30pkgconfig: Use EnvironmentVariables to build PKG_CONFIG_* envXavier Claessens
The new get_env() method that returns an EnvironmentVariables object will be needed in next commit that will pass it to CustomTarget. This has the side effect to use the proper os specific path separator instead of hardcoding `:`. It is the obvious right thing to do here, but has caused issues in the past. Hopefully issues have been fixed in the meantime. If not, better deal with fallouts than keep doing the wrong thing forever.
2022-03-29Pass environment down to base Target classXavier Claessens
2022-03-03add D features to InternalDependencyRemi Thebault
2022-03-01clean up FeatureCheck signature to move location to use timeEli Schwartz
The point of a .use() function is because we don't always have the information we need to use a feature check, so we allow creating the feature and then storing it for later use. When implementing location checks, although it is optional, actually using it violated that design. Move the location out of the init method for FeatureCheck itself. It remains compatible with all cases of .single_use(), but fix the rest up.
2022-01-28build: replace kwargs in CustomTarget initializerDylan Baker
Because we don't want to pass the Interpreter kwargs into the build layer. This turned out to be a mega commit, as there's really on elegant way to make this change in an incremental way. On the nice side, mypy made this change super easy, as nearly all of the calls to `CustomTarget` are fully type checked! It also turns out that we're not handling install_tags in custom_target correctly, since we're not converting the boolean values into Optional values!
2022-01-26Popen_safe and wrappers can accept os.PathLike for cwdEli Schwartz
Do not require users to convert it to a string first. This is a waste of time and effort for exactly the same results.
2021-11-20add location nodes to some Feature callsEli Schwartz
2021-10-29Remove duplicated CEXE_MAPPING tableXavier Claessens
2021-10-27fix various flake8 whitespace errorsEli Schwartz
2021-10-04modules/external_project: use typed_kwargsDylan Baker
Which resolves all of the remaining typing issues.
2021-10-04mdoules/external_project: fix most of the mypy warnings/errorsDylan Baker
2021-10-04modules/external_project: clean up and sort modulesDylan Baker
2021-09-30interpreter: Use typed_kwargs for func_custom_targetDylan Baker
This does not convert the build side, or remove any of the checking it does. We still need that for other callers of custom target. What we'll do for those is add an internal interface that defaults things, then we'll be able to have those callers do their own validation, and the CustomTarget validation machinary can be removed. Fixes #9096
2021-09-29external-project: variables must be dict not listXavier Claessens
Fixes: #9316
2021-09-24build: use an object rather than a dict for the dep_manifestDylan Baker
This really is more of a struct than a dict, as the types are disjoint and they are internally handled, (ie, not from user input). This cleans some things up, in addition I spotted a bug in the ModuleState where the dict with the version and license is passed to a field that expects just the version string.
2021-09-14fix traceback for undefined exception when trying to raise exceptionEli Schwartz
2021-08-20external-project: Add support for WAF build systemXavier Claessens
Fixes: #7638
2021-06-30modules: modules need to return either an ExtensionModlue or aDylan Baker
NewExtensionModule object So that we get the found() method.
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger
2021-06-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger
2021-06-03deps: Split dependencies.baseDaniel Mensinger
Split the Factory and dependency classes out of the base.py script to improve maintainability.
2021-05-28unstable_external_project: Remove unused importsXavier Claessens
2021-05-28modules: Replace find_program_impl() by state.find_program()Xavier Claessens
2021-05-28modules: Stop using InterpreterObjectXavier Claessens
Custom objects returned by modules must be subclass of ModuleObject and have the state argument in its methods. Add MutableModuleObject base class for objects that needs to be deep copied on assignation.
2021-03-26modules/external_project: use typed_pos_argsDylan Baker
2021-03-16externalproject: Flatten configure_options kwargXavier Claessens
2021-03-16externalproject: Do not add --includedir by defaultXavier Claessens
Some projects (e.g. OpenSSL) does not support setting include directory at all.
2021-03-16externalproject: Fix error when used from main projectXavier Claessens
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-02exernal_project: Fix default cross compile parametersLeif Middelschulte
The variable `{host}` cannot be successfully expanded. Using the `@HOST@` parameter, as suggested by the documentation, works.
2021-02-22minstall: Add --skip-subprojects optionXavier Claessens
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-29external_project: Add default configure optionsXavier Claessens
2021-01-29external_project: Do not set LD in the envXavier Claessens
This was breaking some autotools projects such as libyaml.
2021-01-29external_project: Improve loggingXavier Claessens
Write output of 'make' and 'make install' into log files as well when not verbose.
2021-01-20external_project: Log configure commandXavier Claessens
2021-01-17external_project: Write output in log files when not verboseXavier Claessens
2021-01-13build/interpreter: Split InstallDir to fix layering violationDylan Baker
Currently InstallDir is part of the interpreter, and is an Interpreter object, which is then put in the Build object. This is a layering violation, the interperter should have a Holder for build data. This patch fixes that.
2021-01-11rename cflags_mapping to CFLAGS_MAPPINGDylan Baker
This is PEP8 convention for a const variable. Also, make the type Mapping, which doesn't have mutation methods. This means mypy will warn us if someone tries to change this.
2021-01-04Use a single coredata dictionary for optionsDylan Baker
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).
2020-11-20use real pathlib moduleDylan Baker
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-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger
2020-09-13external-project: Add typing annotationXavier Claessens
2020-09-13external-project: New module to build configure/make projectsXavier Claessens
This adds an experimental meson module to build projects with other build systems. Closes: #4316