summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/hdf5.py
AgeCommit message (Collapse)Author
2025-12-17Dependencies: Make use of the DependencyCandidate classDylan Baker
This makes the type checking more reasonable (including fixing an issue that newer mypy is pointing out to us), consolidating special cases, and improving code readability.
2025-12-17dependencies: Require 'native' be passed in kwargsDylan Baker
This simplifies a bunch of cases, and likely fixes some annoying bugs in cross compile situations where should have been passing this and weren't.
2025-12-17dependencies: stop passing "language" as a keyword argumentDylan Baker
It's allowed in the `DependencyKeywordArguments` TypeDict already, so we now have two sources of truth. Additionally, it's often populated by reading from that dict, so we're just doing useless work.
2025-10-20dependencies: Add remaining internal arguments to Dependency classesDylan Baker
These may be better replaced by setting instance attributes, honestly.
2025-10-20interpreter: port dependency native to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency language 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.
2025-03-20hdf5: don't throw if the pkg-config doesn't support --list-allMarcin Serwin
2024-01-31dependencies: hdf5: mark configtool dependency not-found for cmake buildEli Schwartz
When hdf5 is built with cmake instead of autotools, it makes a number of weird changes. What we care about in particular is that h5cc exists but doesn't work -- it happily ignores -show and tries to compile stuff, then leaves us with a dependency that has no libraries, and fails when running `ninja`. See: #12748
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-08-11treewide: automatic rewriting of all comment-style type annotationsEli Schwartz
Performed using https://github.com/ilevkivskyi/com2ann This has no actual effect on the codebase as type checkers (still) support both and negligible effect on runtime performance since __future__ annotations ameliorates that. Technically, the bytecode would be bigger for non function-local annotations, of which we have many either way. So if it doesn't really matter, why do a large-scale refactor? Simple: because people keep wanting to, but it's getting nickle-and-dimed. If we're going to do this we might as well do it consistently in one shot, using tooling that guarantees repeatability and correctness. Repeat with: ``` com2ann mesonbuild/ ```
2023-08-03PkgConfigDependency: Move CLI handling into its own abstractionXavier Claessens
This makes the code cleaner and will allow to have other implementations in the future.
2023-07-23hdf5: remove C sub-dependency for config toolGeorge Sedov
the config tool provided by HDF5 correctly links to the C libraries without explicit sub-dependancy
2023-07-23hdf5: fix wrong env values for config toolGeorge Sedov
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-12-04hdf5 dependency: correctly use machine files and respect crossEli Schwartz
We do some magic to figure out what names of pkg-config dependencies to even search for. This magic simply checked for `pkg-config` the $PATH executable, which was broken in a variety of ways and had a comment to that effect.
2022-11-03dependencies: make the hdf5 dependency use Popen_safeEli Schwartz
It is, after all, "safe". ;) That's why it exists. There's no reason to think listing all pkg-config entries cannot print unicode descriptions, it's absolutely possible, and we should handle it properly if we encounter it.
2022-05-03dependencies: cleanup kwargs.get('static') usageDudemanguy
In a couple of spots, kwargs.get('static', False) was being unneccesarily used. In these spots, we can just use self.static instead which is already inherited from the ExternalDependency. In additional, the python system dependency oddly has a kwargs.get('static', False) line which overrides the self.static in that dependency for no real reason. Delete this line too.
2022-01-27flake8: fix indentation styleEli Schwartz
2022-01-10pyupgrade --py37-plusEli Schwartz
2021-11-17hdf5 dependency: check for alternative config-tool namesEli Schwartz
Depending on whether hdf5 is compiled with parallel support, the same config-tool program may be installed with a mysterious "p" in the name. In this case, dependency lookup will totally fail, unless of course you use the superior pkg-config interface in which case you get a predictable name. Work around this insanity by checking for both types of config-tool name. Fixes #9555
2021-09-14apply flake8 fixes for unused imports and missing importsEli Schwartz
2021-06-09typing: Rename some variablesDaniel Mensinger
2021-06-06typing: Fully annotate dependencies.{detect,factory} + some other fixesDaniel Mensinger
2021-06-03deps: Split dependencies.baseDaniel Mensinger
Split the Factory and dependency classes out of the base.py script to improve maintainability.
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-04various python neatness cleanupsEli Schwartz
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-02-26hdf5: get include directory from config-toolMichael Kuhn
hdf5's config-tools will not show compile arguments (including the include directory) if called without `-c`. Make sure to get both the compile and link arguments.
2021-01-11import MachineChoice from mesonlibDylan Baker
there are a couple of places importing it from envconfig, which is not correct. It's defined in mesonlib, and then imported into envconfig.
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-25dependencies/hdf5: Use the correct compilers for the machineDylan Baker
Instead of the default ones, this is especially important when cross compiling or when using compilers that aren't compatible with the default ones. squash! dependencies/hdf5: Use the actual system compilers
2020-09-25dependencies/hdf5: Convert to a dependency_factoryDylan Baker
Instead of a mega dependency that does everything, use a dependency factory for config-tool and pkg-config
2020-09-08typing: fix dependencies for new follow_importsDaniel Mensinger
2020-09-08typing: fully annotate boost and hdf5 depsDaniel Mensinger
2020-08-11Add h5cc shlib argument for correctly link hdf5 librariesWilliam F Godoy
respect "static" key in dependency function -shlib for static dependency -noshlib for static dependency
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.
2020-01-08bugfix: hdf5 depenedency: make sure variable is always definedMichael Hirsch, Ph.D
2019-12-19dependencies: refactor to use methods properlyMichael Hirsch, Ph.D
2019-12-17Fail gracefully detecting hdf5 if pkg-config is not available.Jussi Pakkanen
2019-11-28HDF5: make much more robust across platformsMichael Hirsch, Ph.D
This addresses various real-world problems with HDF5 pkg-config, including * hdf*.pc with package versions as part of the filename * malformed hdf*.pc missing the commonly-used HDF5 HL module --- Additionally, this refactors more complicated dependencies such as HDF5 and OpenMPI. This may help us deduplicate internal dependency code in the future. HDF5 selftest: improve platform-agnostic test ci: init demo github action for HDF5 framework ci Actions: hold off on MSYS2 for now [skip ci] hdf5: ensure C libraries always included ci: mac hdf5--use clang+gfortran