py-netcdf4: make sure we don't use system hdf5. (#16492)
This commit is contained in:
parent
b14befe61a
commit
2139c8e53e
2 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -309,2 +309,3 @@ except OSError:
|
||||||
|
HAS_PKG_CONFIG = False
|
||||||
|
+HAS_PKG_CONFIG = False
|
||||||
|
|
|
@ -25,6 +25,13 @@ class PyNetcdf4(PythonPackage):
|
||||||
depends_on('netcdf-c')
|
depends_on('netcdf-c')
|
||||||
depends_on('hdf5@1.8.0:+hl')
|
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):
|
def setup_build_environment(self, env):
|
||||||
"""Ensure installed netcdf and hdf5 libraries are used"""
|
"""Ensure installed netcdf and hdf5 libraries are used"""
|
||||||
# Explicitly set these variables so setup.py won't erroneously pick up
|
# Explicitly set these variables so setup.py won't erroneously pick up
|
||||||
|
|
Loading…
Reference in a new issue