Skip to content

Commit

Permalink
silo: variant python needs python (spack#48257)
Browse files Browse the repository at this point in the history
* silo: variant python needs python

* Dependency to Python did not resolve the "Python.h" header not being found

Added the -I path to Python header to the compiler.
Having silo depend on python was not sufficient to get the path to python.
Maybe there is a smarter way to do that, but this one works.

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <[email protected]>

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <[email protected]>

* Update var/spack/repos/builtin/packages/silo/package.py

Co-authored-by: Wouter Deconinck <[email protected]>

---------

Co-authored-by: Wouter Deconinck <[email protected]>
  • Loading branch information
cessenat and wdconinc authored Dec 23, 2024
1 parent d1d6182 commit 88d5393
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/silo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Silo(AutotoolsPackage):
variant("hzip", default=True, description="Enable hzip support")
variant("fpzip", default=True, description="Enable fpzip support")

depends_on("python", type=("build", "link"), when="+python")
depends_on("perl", type="build")
depends_on("m4", type="build", when="+shared")
depends_on("autoconf", type="build", when="+shared")
Expand Down Expand Up @@ -129,6 +130,8 @@ def flag_handler(self, name, flags):
if spec.satisfies("%oneapi"):
flags.append("-Wno-error=int")
flags.append("-Wno-error=int-conversion")
if spec.satisfies("+python"):
flags.append(f"-I {spec['python'].headers.directories[0]}")
if "+hdf5" in spec:
# @:4.10 can use up to the 1.10 API
if "@:4.10" in spec:
Expand Down

0 comments on commit 88d5393

Please sign in to comment.