easi: add v1.3.0, python bindings and master (#42784)
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
@@ -14,14 +16,18 @@ class Easi(CMakePackage):
|
|||||||
homepage = "https://easyinit.readthedocs.io"
|
homepage = "https://easyinit.readthedocs.io"
|
||||||
git = "https://github.com/SeisSol/easi.git"
|
git = "https://github.com/SeisSol/easi.git"
|
||||||
|
|
||||||
maintainers("ravil-mobile", "Thomas-Ulrich", "krenzland", "ThrudPrimrose", "davschneller")
|
maintainers("Thomas-Ulrich", "davschneller", "vikaskurapati")
|
||||||
|
|
||||||
license("BSD-3-Clause")
|
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.2.0", tag="v1.2.0", commit="305a119338116a0ceac6b68b36841a50250d05b1")
|
||||||
version("1.1.2", tag="v1.1.2", commit="4c87ef3b3dca9415d116ef102cb8de750ef7e1a0")
|
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("asagi", default=True, description="build with ASAGI support")
|
||||||
variant(
|
variant(
|
||||||
"jit",
|
"jit",
|
||||||
@@ -38,6 +44,8 @@ class Easi(CMakePackage):
|
|||||||
depends_on("lua@5.3.2", when="jit=lua")
|
depends_on("lua@5.3.2", when="jit=lua")
|
||||||
depends_on("impalajit@main", when="jit=impalajit")
|
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", when="jit=impalajit-llvm")
|
||||||
conflicts("jit=impalajit-llvm", when="jit=impalajit")
|
conflicts("jit=impalajit-llvm", when="jit=impalajit")
|
||||||
|
|
||||||
@@ -49,6 +57,8 @@ class Easi(CMakePackage):
|
|||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
args = []
|
args = []
|
||||||
args.append(self.define_from_variant("ASAGI", "asagi"))
|
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
|
spec = self.spec
|
||||||
if "jit=impalajit" in spec or "jit=impalajit-llvm" in spec:
|
if "jit=impalajit" in spec or "jit=impalajit-llvm" in spec:
|
||||||
args.append(self.define("IMPALAJIT", True))
|
args.append(self.define("IMPALAJIT", True))
|
||||||
@@ -60,4 +70,12 @@ def cmake_args(self):
|
|||||||
if "jit=lua" in spec:
|
if "jit=lua" in spec:
|
||||||
args.append(self.define("LUA", True))
|
args.append(self.define("LUA", True))
|
||||||
|
|
||||||
|
if "+python" in spec:
|
||||||
|
args += [self.define("easi_INSTALL_PYTHONDIR", python_platlib)]
|
||||||
|
|
||||||
return args
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user