summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-psana/package.py
blob: a35d1e08a38203bb7eb2ea6af6fe848f579fb33b (plain) (blame)
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
# Copyright 2013-2024 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 PyPsana(PythonPackage):
    """LCLS II Developement: PSAna Python."""

    homepage = "https://github.com/slac-lcls/lcls2"
    url = "https://github.com/slac-lcls/lcls2/archive/refs/tags/3.3.37.tar.gz"

    maintainers("valmar")

    version("3.3.37", sha256="127a5ae44c9272039708bd877849a3af354ce881fde093a2fc6fe0550b698b72")

    patch("setup.patch")

    depends_on("py-setuptools", type="build")
    depends_on("py-cython", type="build")
    depends_on("py-numpy", type=("build", "run"))
    depends_on("py-matplotlib", type=("build", "run"))
    depends_on("py-psalg", type=("build", "run"))
    depends_on("py-requests", type=("build", "run"))
    depends_on("py-mpi4py", type=("build", "run"))
    depends_on("py-pymongo", type=("build", "run"))
    depends_on("py-amityping", type=("build", "run"))
    depends_on("py-mypy-extensions", type=("build", "run"))
    depends_on("py-h5py", type=("build", "run"))
    depends_on("py-pyzmq", type=("build", "run"))
    depends_on("py-psmon", type=("build", "run"))
    depends_on("py-lcls-krtc", type=("build", "run"))
    depends_on("py-psmon", type=("build", "run"))
    depends_on("py-ipykernel", type=("build", "run"))
    depends_on("opencv", type=("build", "run"))
    depends_on("py-scikit-learn", type=("build", "run"))
    depends_on("py-pyabel", type=("build", "run"))
    depends_on("py-prometheus-client", type=("build", "run"))
    depends_on("xtcdata", type=("build", "run", "link"))
    depends_on("psalg", type=("build", "run", "link"))

    build_directory = "psana"

    def setup_build_environment(self, env):
        env.set("INSTDIR", "{0}".format(self.prefix))
        env.set("XTCDATADIR", "{0}".format(self.spec["xtcdata"].prefix))
        env.set("PSALGDIR", "{0}".format(self.spec["psalg"].prefix))