summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-unyt/package.py
blob: ed4928272c11ca5e0407e744731f4f321e5cfd67 (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
# 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 PyUnyt(PythonPackage):
    """A package for handling numpy arrays with units."""

    homepage = "https://yt-project.org"
    pypi = "unyt/unyt-2.8.0.tar.gz"
    git = "https://github.com/yt-project/unyt.git"

    maintainers("charmoniumq")

    license("BSD-3-Clause")

    version("main", branch="main")
    version("2.9.2", sha256="8d4bf3dd3f7b4c29580728c0359caa17d62239673eeab436448d0777adeee5e1")

    # Undocumented in 2.9.2
    depends_on("py-setuptools", type="build")

    # https://github.com/yt-project/unyt/blob/v2.9.2/setup.py#L50
    depends_on("python@3.8:", type=("build", "run"))

    # https://github.com/yt-project/unyt/blob/v2.9.2/setup.py#L21
    depends_on("py-numpy@1.17.5:", type=("build", "run"))
    depends_on("py-sympy@1.5:", type=("build", "run"))