Commit Graph

24 Commits

Author SHA1 Message Date
Dudemanguy 8b3a54e508 dependencies: cleanup kwargs.get('static') usage
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-05-03 23:03:56 -04:00
Eli Schwartz 3990dc6d64 flake8: fix indentation style 2022-01-27 10:48:01 -08:00
Eli Schwartz 751f84405e
pyupgrade --py37-plus 2022-01-10 18:36:56 -05:00
Eli Schwartz 4f4259de1b hdf5 dependency: check for alternative config-tool names
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-11-17 23:07:14 +02:00
Eli Schwartz 87e13af1c8
apply flake8 fixes for unused imports and missing imports 2021-09-14 15:55:07 -04:00
Daniel Mensinger 2263a84d07 typing: Rename some variables 2021-06-09 09:46:37 +02:00
Daniel Mensinger 25875ae0d3 typing: Fully annotate dependencies.{detect,factory} + some other fixes 2021-06-06 20:30:24 +03:00
Daniel Mensinger 95b70bcb97 deps: Split dependencies.base
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
2021-06-03 10:23:27 -07:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Eli Schwartz 4340bf34fa
various python neatness cleanups
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-04 17:11:26 -05:00
Michael Kuhn 2d8d21d5bc hdf5: get include directory from config-tool
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-02-26 23:04:02 +02:00
Dylan Baker a2055ad18b import MachineChoice from mesonlib
there are a couple of places importing it from envconfig, which is not
correct. It's defined in mesonlib, and then imported into envconfig.
2021-01-11 11:15:06 -08:00
Dylan Baker f6672c7a19 use real pathlib module
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-11-20 15:08:40 -08:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
Dylan Baker 54329eeed7 dependencies/hdf5: Use the correct compilers for the machine
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-25 11:11:46 -07:00
Dylan Baker b7cb30e175 dependencies/hdf5: Convert to a dependency_factory
Instead of a mega dependency that does everything, use a dependency
factory for config-tool and pkg-config
2020-09-25 11:11:46 -07:00
Daniel Mensinger 62f7642a61
typing: fix dependencies for new follow_imports 2020-09-08 20:15:58 +02:00
Daniel Mensinger 1217cf9a3b
typing: fully annotate boost and hdf5 deps 2020-09-08 20:15:57 +02:00
William F Godoy 847d652c4e Add h5cc shlib argument for correctly link hdf5 libraries
respect "static" key in dependency function
-shlib for static dependency
-noshlib for static dependency
2020-08-11 09:42:18 -07:00
Dylan Baker fd892ad7ce dependencies: Make Dependency initializer signatures match
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-29 09:11:24 -08:00
Michael Hirsch, Ph.D ff822990d1 bugfix: hdf5 depenedency: make sure variable is always defined 2020-01-08 18:59:48 +02:00
Michael Hirsch, Ph.D f1d370247f
dependencies: refactor to use methods properly 2019-12-19 11:52:32 -05:00
Jussi Pakkanen 39db7b1afc Fail gracefully detecting hdf5 if pkg-config is not available. 2019-12-17 15:10:13 +02:00
Michael Hirsch, Ph.D c02593fddc HDF5: make much more robust across platforms
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
2019-11-28 12:51:58 +02:00