This repository was archived by the owner on Feb 26, 2025. It is now read-only.
forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpackage.py
66 lines (56 loc) · 2.49 KB
/
package.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 2013-2018 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.package import *
class LibsonataReport(CMakePackage):
"""
`libsonatareport` provides C++ API for writing SONATA reports
See also:
https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md
"""
homepage = "https://github.com/BlueBrain/libsonatareport"
git = "https://github.com/BlueBrain/libsonatareport.git"
version("develop", branch="master", submodules=False, get_full_repo=True)
version("1.2.5", tag="1.2.5", submodules=False)
version("1.2.4", tag="1.2.4", submodules=False)
version("1.2.3", tag="1.2.3", submodules=False)
version("1.2.2", tag="1.2.2", submodules=False)
version("1.2.1", tag="1.2.1", submodules=False)
version("1.2", tag="1.2", submodules=False)
version("1.1.1", tag="1.1.1", submodules=False)
version("1.1", tag="1.1", submodules=False)
version("1.0.0.20220218", commit="905641", submodules=False)
version("1.0.0.20211007", commit="b881fa", submodules=False)
version("1.0.0.20210610", commit="ad8870", submodules=False)
version("1.0.0.20210531", commit="f6916a", submodules=False)
version("1.0", tag="1.0", submodules=False)
version("0.1b", tag="0.1b", submodules=False)
version("0.1a", tag="0.1a", submodules=False)
variant("mpi", default=True, description="Enable MPI backend")
depends_on("cmake@3.3:", type="build")
depends_on("mpi", when="+mpi")
depends_on("spdlog@1.9.1:")
depends_on("hdf5 ~mpi", when="~mpi")
depends_on("hdf5 +mpi", when="+mpi")
def cmake_args(self):
result = [
"-DSONATA_REPORT_ENABLE_SUBMODULES=OFF",
"-DSONATA_REPORT_ENABLE_TEST=OFF",
"-DSONATA_REPORT_ENABLE_WARNING_AS_ERROR=OFF",
"-DSONATA_REPORT_ENABLE_CONVERTER=ON",
]
if self.spec.satisfies("+mpi"):
result.append("-DSONATA_REPORT_ENABLE_MPI=ON")
return result
@property
def libs(self):
"""Export the libsonata library.
Sample usage: spec['libsonata'].libs.ld_flags
"""
search_paths = [[self.prefix.lib64, False], [self.prefix.lib, False]]
for path, recursive in search_paths:
libs = find_libraries(["libsonatareport"], root=path, shared=True, recursive=False)
if libs:
return libs
return None