summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/platform.py
AgeCommit message (Collapse)Author
2025-12-17dependencies: Remove `log_tried` methodDylan Baker
It's now only used to populate the DependencyCandidate, so we can remove it and just calculate the same information from the `type_name` parameter. This reduces code and the number of method calls.
2025-12-17dependencies: Pass the `name` to `ExternalDependency` constructorDylan Baker
So we don't create a default name that is overwritten except in the case of appleframeworks. This allows for some cleanup, including deleting some initializers that were only setting the name.
2025-12-17dependencies: Move type_name to class levelDylan Baker
This is really class constant for all dependencies, and by taking it out of the initializer we make the `__init__` call have a more consistent interface.
2025-11-19compilers: Remove Environment parameter from Compiler.find_frameworkDylan Baker
Which, ironically, is passed down three levels and never used.
2025-10-20interpreter: port dependency modules to typed_kwargsDylan Baker
2025-10-20dependency: Use a TypedDict to describe the keyword arguments to DependencyDylan Baker
This allows us to check that all of the keyword arguments are of the correct type.
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-06-26dependencies: switch the delayed-import mechanism for custom dependenciesEli Schwartz
Simply store the module it is expected to be found in. That module then appends to the packages dict, which guarantees mypy can verify that it's got the right type -- there is no casting needed.
2023-02-01treewide: add future annotations importEli Schwartz
2022-09-12dependencies: simplify log_tried into a staticmethodEli Schwartz
It doesn't really need class instantiation to just know what type it is, and this way we can get the information early if a dependency fails to init.
2021-06-14dependencies: Use a typing.NewType for Dependency.type_nameDylan Baker
This allow mypy to catch cases where we accidently assign the dependency name to the type_name, as it sees them as having different types (though at runtime they're all strings).
2021-06-09compilers: Fix missing functions in Compiler base classDaniel Mensinger
2021-06-06typing: Fully annotate dependencies.platformDaniel Mensinger
2020-01-29dependencies: Make Dependency initializer signatures matchDylan Baker
Currently PkgConfig takes language as a keyword parameter in position 3, while the others take it as positional in position 2. Because most dependencies don't actually set a language (they use C style linking), using a positional argument makes more sense. ExtraFrameworkDependencies is even more different, and duplicates some arguments from the base ExternalDependency class. For later changes I'm planning to make having all of the dependencies use the same signature is really, really helpful.
2019-05-02Non-required appleframework deps should not be an error. Closes #5295.Jussi Pakkanen
2019-03-10Fix appleframeworks with multiple modules.Jussi Pakkanen
2019-02-01better handle variable HDF5 setups, update Fortran compiler defMichael Hirsch, Ph.D
2019-02-01Rewrite appleframework and extraframework dependency classesNirbheek Chauhan
Instead of only doing a naive filesystem search, also run the linker so that it can tell us whether the -F path specified actually contains the framework we're looking for. Unfortunately, `extraframework` searching is still not 100% correct in the case when since we want to search in either /Library/Frameworks or in /System/Library/Frameworks but not in both. The -Z flag disables searching in those prefixes and would in theory allow this, but then you cannot force the linker to look in those by manually adding -F args, so that doesn't work.
2018-11-02Fix incorrect checking of build machine for dependency availabilityJon Turney
Don't check the build machine to determine a dependency whose availability is static property of the host machine
2018-09-10Add missing reporting of some methods tried to find the dependencyJon Turney
Make us report 'system' and 'framework' when we tried those methods to locate the dependency.
2018-08-26Comparison with an unknown dependency version should always failJon Turney
Consistently use None to store an unknown dependency version (rather than 'none', 'unknown' or some made up version)
2018-08-26Set is_found in AppleFrameworks constructorJon Turney
Set is_found in AppleFrameworks constructor, rather than overriding the found() method, as other superclass methods may access is_found.
2018-06-20dependencies: Don't assume self.compiler is a C compilerNirbheek Chauhan
All dependencies were using find_library, has_header, get_define, etc on self.compiler assuming that it's a compiler that outputs and consumes C-like libraries. This is not true for D (and in the future, for Rust) since although they can consume C libraries, they do not use the C ecosystem. For such purposes, we now have self.clib_compiler. Nothing uses self.compiler anymore as a result, and it has been removed.
2017-06-09dependencies: Add a new class ExternalDependencyNirbheek Chauhan
This class now consolidates a lot of the logic that each external dependency was duplicating in its class definition. All external dependencies now set: * self.version * self.compile_args and self.link_args * self.is_found (if found) * self.sources * etc And the abstract ExternalDependency class defines the methods that will fetch those properties. Some classes still override that for various reasons, but those should also be migrated to properties as far as possible. Next step is to consolidate and standardize the way in which we call 'configuration binaries' such as sdl2-config, llvm-config, pkg-config, etc. Currently each class has to duplicate code involved with that even though the format is very similar. Currently only pkg-config supports multiple version requirements, and some classes don't even properly check the version requirement. That will also become easier now.
2017-05-09Split apart platform-specific dependenciesElliott Sales de Andrade