# 最小構成の Spack package.py 例
from spack.package import *

class MyLib(CMakePackage):
    """My library short description."""
    homepage = "https://example.com"
    git      = "https://github.com/example/mylib.git"

    version("1.0.0", tag="v1.0.0")

    depends_on("cmake@3.10:", type="build")
    depends_on("hdf5+mpi", when="+mpi")

    variant("mpi", default=False, description="Enable MPI support")

    def cmake_args(self):
        args = []
        args.append(self.define_from_variant("ENABLE_MPI", "mpi"))
        return args