diff options
author | Thomas-Ulrich <ulrich@geophysik.uni-muenchen.de> | 2024-03-22 02:44:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 02:44:20 +0100 |
commit | d7a74bde9fe1a7e2d338cedc12ca06370ea039dd (patch) | |
tree | e514c7e2a32dc8f80a430b946adef95ecee5dee1 /var | |
parent | fedf8128ae13abeaad933ef63f598db317c39d79 (diff) | |
download | spack-d7a74bde9fe1a7e2d338cedc12ca06370ea039dd.tar.gz spack-d7a74bde9fe1a7e2d338cedc12ca06370ea039dd.tar.bz2 spack-d7a74bde9fe1a7e2d338cedc12ca06370ea039dd.tar.xz spack-d7a74bde9fe1a7e2d338cedc12ca06370ea039dd.zip |
easi: add v1.3.0, python bindings and master (#42784)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/easi/package.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/easi/package.py b/var/spack/repos/builtin/packages/easi/package.py index ea5a113ed1..f93940c9ae 100644 --- a/var/spack/repos/builtin/packages/easi/package.py +++ b/var/spack/repos/builtin/packages/easi/package.py @@ -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 @@ class Easi(CMakePackage): 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) |