Skip to content
Snippets Groups Projects
Commit 4c68d2e1 authored by Dustin Lagoy's avatar Dustin Lagoy Committed by Peter Scheibel
Browse files

py-netcdf4: avoid using system installs of dependencies (#10885)

Use environment variables to point setup.py to Spack installations
of hdf5/netcdf
parent c124b1f4
No related branches found
No related tags found
No related merge requests found
......@@ -23,3 +23,13 @@ class PyNetcdf4(PythonPackage):
depends_on('netcdf')
depends_on('hdf5@1.8.0:')
def setup_environment(self, spack_env, run_env):
"""Ensure installed netcdf and hdf5 libraries are used"""
# Explicitly set these variables so setup.py won't erroneously pick up
# system versions
spack_env.set('USE_SETUPCFG', '0')
spack_env.set('HDF5_INCDIR', self.spec['hdf5'].prefix.include)
spack_env.set('HDF5_LIBDIR', self.spec['hdf5'].prefix.lib)
spack_env.set('NETCDF4_INCDIR', self.spec['netcdf'].prefix.include)
spack_env.set('NETCDF4_LIBDIR', self.spec['netcdf'].prefix.lib)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment