summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSebastian Gottfried <sebastian.gottfried@posteo.de>2020-06-30 04:36:38 +0200
committerGitHub <noreply@github.com>2020-06-29 21:36:38 -0500
commit5e1cb24bec56271ef3e393457f71d083eb99cba8 (patch)
tree5911c32e30f31d02b67d05b2901406bdea3bd51f /var
parent2de0053c08c3262eb3979ff7818f4ca505c72517 (diff)
downloadspack-5e1cb24bec56271ef3e393457f71d083eb99cba8.tar.gz
spack-5e1cb24bec56271ef3e393457f71d083eb99cba8.tar.bz2
spack-5e1cb24bec56271ef3e393457f71d083eb99cba8.tar.xz
spack-5e1cb24bec56271ef3e393457f71d083eb99cba8.zip
py-mpi4py: Implement headers Property (#17295)
py-mpi4py installs its header files at a difficult-to-predict location: $prefix/lib/python-x.y/site-packages/mpi4py/include With the new `headers` properties, dependent packages have now an easy way to obtain this location: spec['py-mpi4py'].headers.directories[0]
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-mpi4py/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
index c4ce8b3a98..f4af51fcfe 100644
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -30,3 +30,8 @@ class PyMpi4py(PythonPackage):
def build_args(self, spec, prefix):
return ['--mpicc=%s -shared' % spec['mpi'].mpicc]
+
+ @property
+ def headers(self):
+ headers = find_all_headers(self.prefix.lib)
+ return headers