diff --git a/var/spack/repos/builtin/packages/py-pyhdf/package.py b/var/spack/repos/builtin/packages/py-pyhdf/package.py index 0cdb79ef0fc3a1..40a3e8c66c25f7 100644 --- a/var/spack/repos/builtin/packages/py-pyhdf/package.py +++ b/var/spack/repos/builtin/packages/py-pyhdf/package.py @@ -26,7 +26,7 @@ class PyPyhdf(PythonPackage): depends_on("python@3.2:", type=("build", "run")) # Dependencies - depends_on("zlib", type=("build", "run")) + depends_on("zlib-api", type=("build", "run")) depends_on("hdf", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("jpeg", type=("build", "run")) @@ -35,10 +35,10 @@ def setup_build_environment(self, env): inc_dirs = [] lib_dirs = [] # Strip -I and -L from spec include_flags / search_flags - inc_dirs.append(self.spec["zlib"].headers.include_flags.lstrip("-I")) + inc_dirs.append(self.spec["zlib-api"].headers.include_flags.lstrip("-I")) inc_dirs.append(self.spec["hdf"].headers.include_flags.lstrip("-I")) inc_dirs.append(self.spec["jpeg"].headers.include_flags.lstrip("-I")) - lib_dirs.append(self.spec["zlib"].libs.search_flags.lstrip("-L")) + lib_dirs.append(self.spec["zlib-api"].libs.search_flags.lstrip("-L")) lib_dirs.append(self.spec["hdf"].libs.search_flags.lstrip("-L")) lib_dirs.append(self.spec["jpeg"].libs.search_flags.lstrip("-L")) env.set("INCLUDE_DIRS", ":".join(inc_dirs))