diff options
author | Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> | 2020-05-07 01:14:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 18:14:10 -0500 |
commit | 2139c8e53ebde69095b643302291a35c4474515c (patch) | |
tree | 8f27efb42eba94d71bf1077eff7ef423a42c6ec4 | |
parent | b14befe61a848c20811aed24e9015277e64ebb30 (diff) | |
download | spack-2139c8e53ebde69095b643302291a35c4474515c.tar.gz spack-2139c8e53ebde69095b643302291a35c4474515c.tar.bz2 spack-2139c8e53ebde69095b643302291a35c4474515c.tar.xz spack-2139c8e53ebde69095b643302291a35c4474515c.zip |
py-netcdf4: make sure we don't use system hdf5. (#16492)
-rw-r--r-- | var/spack/repos/builtin/packages/py-netcdf4/disable_pkgconf.patch | 6 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-netcdf4/package.py | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-netcdf4/disable_pkgconf.patch b/var/spack/repos/builtin/packages/py-netcdf4/disable_pkgconf.patch new file mode 100644 index 0000000000..b2b690c7c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-netcdf4/disable_pkgconf.patch @@ -0,0 +1,6 @@ +--- a/setup.py ++++ b/setup.py +@@ -309,2 +309,3 @@ except OSError: + HAS_PKG_CONFIG = False ++HAS_PKG_CONFIG = False + diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py index a9dd01db2c..5516bc751e 100644 --- a/var/spack/repos/builtin/packages/py-netcdf4/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py @@ -25,6 +25,13 @@ class PyNetcdf4(PythonPackage): depends_on('netcdf-c') depends_on('hdf5@1.8.0:+hl') + # The installation script tries to find hdf5 using pkg-config. However, the + # version of hdf5 installed with Spack does not have pkg-config files. + # Therefore, if pkg-config finds hdf5.pc at all (e.g. provided by + # Ubuntu/Debian package manager), it is definitely not what we need. The + # following patch disables the usage of pkg-config at all. + patch('disable_pkgconf.patch') + def setup_build_environment(self, env): """Ensure installed netcdf and hdf5 libraries are used""" # Explicitly set these variables so setup.py won't erroneously pick up |