Skip to content

Commit

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

* use enable_or_disable

* use extend
  • Loading branch information
gardner48 authored Aug 19, 2024
1 parent c064a30 commit ad6c738
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions var/spack/repos/builtin/packages/silo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Silo(AutotoolsPackage):
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated

variant("python", default=True, description="Enable Python support")
variant("fortran", default=True, description="Enable Fortran support")
variant("shared", default=True, description="Build shared libraries")
variant("silex", default=False, description="Builds Silex, a GUI for viewing Silo files")
Expand Down Expand Up @@ -198,14 +199,14 @@ def force_autoreconf(self):

def configure_args(self):
spec = self.spec
config_args = [
"--enable-install-lite-headers",
"--enable-fortran" if "+fortran" in spec else "--disable-fortran",
"--enable-silex" if "+silex" in spec else "--disable-silex",
"--enable-shared" if "+shared" in spec else "--disable-shared",
"--enable-hzip" if "+hzip" in spec else "--disable-hzip",
"--enable-fpzip" if "+fpzip" in spec else "--disable-fpzip",
]
config_args = ["--enable-install-lite-headers"]

config_args.extend(self.enable_or_disable("pythonmodule", variant="python"))
config_args.extend(self.enable_or_disable("fortran"))
config_args.extend(self.enable_or_disable("silex"))
config_args.extend(self.enable_or_disable("shared"))
config_args.extend(self.enable_or_disable("hzip"))
config_args.extend(self.enable_or_disable("fpzip"))

# Do not specify the prefix of zlib if it is in a system directory
# (see https://github.com/spack/spack/pull/21900).
Expand Down

0 comments on commit ad6c738

Please sign in to comment.