easi: add v1.3.0, python bindings and master (#42784)
This commit is contained in:
parent
fedf8128ae
commit
d7a74bde9f
@ -3,6 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@ -14,14 +16,18 @@ class Easi(CMakePackage):
|
||||
homepage = "https://easyinit.readthedocs.io"
|
||||
git = "https://github.com/SeisSol/easi.git"
|
||||
|
||||
maintainers("ravil-mobile", "Thomas-Ulrich", "krenzland", "ThrudPrimrose", "davschneller")
|
||||
maintainers("Thomas-Ulrich", "davschneller", "vikaskurapati")
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="master")
|
||||
version("master", branch="master")
|
||||
version("1.3.0", tag="v1.3.0", commit="99309a0fa78bf11d668c599b3ee469224f04d55b")
|
||||
version("1.2.0", tag="v1.2.0", commit="305a119338116a0ceac6b68b36841a50250d05b1")
|
||||
version("1.1.2", tag="v1.1.2", commit="4c87ef3b3dca9415d116ef102cb8de750ef7e1a0")
|
||||
|
||||
variant("python", default=True, description="Install python bindings")
|
||||
extends("python", when="+python")
|
||||
|
||||
variant("asagi", default=True, description="build with ASAGI support")
|
||||
variant(
|
||||
"jit",
|
||||
@ -38,6 +44,8 @@ class Easi(CMakePackage):
|
||||
depends_on("lua@5.3.2", when="jit=lua")
|
||||
depends_on("impalajit@main", when="jit=impalajit")
|
||||
|
||||
depends_on("py-pybind11@2.6.2:", type="build", when="+python")
|
||||
|
||||
conflicts("jit=impalajit", when="jit=impalajit-llvm")
|
||||
conflicts("jit=impalajit-llvm", when="jit=impalajit")
|
||||
|
||||
@ -49,6 +57,8 @@ class Easi(CMakePackage):
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
args.append(self.define_from_variant("ASAGI", "asagi"))
|
||||
args.append(self.define_from_variant("PYTHON_BINDINGS", "python"))
|
||||
self.define("PYBIND11_USE_FETCHCONTENT", False)
|
||||
spec = self.spec
|
||||
if "jit=impalajit" in spec or "jit=impalajit-llvm" in spec:
|
||||
args.append(self.define("IMPALAJIT", True))
|
||||
@ -60,4 +70,12 @@ def cmake_args(self):
|
||||
if "jit=lua" in spec:
|
||||
args.append(self.define("LUA", True))
|
||||
|
||||
if "+python" in spec:
|
||||
args += [self.define("easi_INSTALL_PYTHONDIR", python_platlib)]
|
||||
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
if "+python" in self.spec:
|
||||
full_path = os.path.join(python_platlib, "easilib/cmake/easi/python_wrapper")
|
||||
env.prepend_path("PYTHONPATH", full_path)
|
||||
|
Loading…
Reference in New Issue
Block a user