Add paths to PKG_CONFIG_PATH to find cray .pc file (#3378)

* Add paths to PKG_CONFIG_PATH to find cray .pc file

Adds two paths: /usr/lib64/pkgconfig and /usr/local/lib64/pkgconfig.

cray pkg-config looks at two different paths which are not included
in PKG_CONFIG_PATH environment variable. This PR addresses #3167.

* Flake8 fixes

* flake8 fix again
This commit is contained in:
Mario Melara 2017-03-10 16:29:20 -08:00 committed by becker33
parent e727f56d89
commit 15f80ed15c

View File

@ -42,6 +42,14 @@ class PkgConfig(Package):
# The following patch is needed for gcc-6.1 # The following patch is needed for gcc-6.1
patch('g_date_strftime.patch') patch('g_date_strftime.patch')
@when("platform=cray")
def setup_dependent_environment(self, spack_env, run_env, dep_spec):
"""spack built pkg-config on cray's requires adding /usr/local/
and /usr/lib64/ to PKG_CONFIG_PATH in order to access cray '.pc'
files."""
spack_env.prepend_path("PKG_CONFIG_PATH", "/usr/lib64/pkgconfig")
spack_env.prepend_path("PKG_CONFIG_PATH", "/usr/local/lib64/pkgconfig")
def install(self, spec, prefix): def install(self, spec, prefix):
args = ["--prefix={0}".format(prefix), args = ["--prefix={0}".format(prefix),
"--enable-shared"] "--enable-shared"]