diff options
author | Valentin Volkl <valentin.volkl@cern.ch> | 2021-07-15 14:06:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 14:06:41 +0200 |
commit | fa4b9a6abc54eacd4d6859c972a0a81913d59657 (patch) | |
tree | 7ad7d933c255c84832027f19ba0f1d261444479a /var | |
parent | 0a3f875b9561c3f1940c8a933892700e452e92e2 (diff) | |
download | spack-fa4b9a6abc54eacd4d6859c972a0a81913d59657.tar.gz spack-fa4b9a6abc54eacd4d6859c972a0a81913d59657.tar.bz2 spack-fa4b9a6abc54eacd4d6859c972a0a81913d59657.tar.xz spack-fa4b9a6abc54eacd4d6859c972a0a81913d59657.zip |
simsipm: add new package (#24903)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/simsipm/package.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/simsipm/package.py b/var/spack/repos/builtin/packages/simsipm/package.py new file mode 100644 index 0000000000..9db1d87c82 --- /dev/null +++ b/var/spack/repos/builtin/packages/simsipm/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Simsipm(CMakePackage): + """SimSiPM is a simple and easy to use C++ library providing a set of + object-oriented tools with all the functionality needed to describe + and simulate Silicon PhotonMultipliers (SiPM) sensors.""" + + url = "https://github.com/EdoPro98/SimSiPM/archive/refs/tags/v1.2.4.tar.gz" + homepage = "https://github.com/EdoPro98/SimSiPM/" + git = "https://github.com/EdoPro98/SimSiPM.git" + + tags = ['hep'] + + maintainers = ['vvolkl'] + + version('1.2.4', sha256='1c633bebb19c490b5e6dfa5ada4a6bc7ec36348237c2626d57843a25af923211') + + variant('python', default=False, description="Build pybind11-based python bindings") + variant('openmp', default=False, description="Use OpenMP") + + extends('python', when='+python') + depends_on('python@3.6:', when="+python", type=('build', 'run')) + depends_on('py-pybind11', when="+python", type=('build', 'link')) + + def cmake_args(self): + args = [ + self.define_from_variant("SIPM_BUILD_PYTHON", "python"), + self.define_from_variant("SIPM_ENABLE_OPENMP", "openmp"), + self.define("SIPM_ENABLE_TEST", self.run_tests), + + ] + return args |