summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-quart/package.py
blob: a3d49bac24b6c16c7cde85f18a578597c813105a (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 PyQuart(PythonPackage):
    """A Python ASGI web microframework with the same API as
    Flask."""

    homepage = "https://gitlab.com/pgjones/quart/"
    pypi = "quart/quart-0.16.3.tar.gz"

    license("MIT")

    version("0.19.8", sha256="ef567d0be7677c99890d5c6ff30e679699fe7e5fca1a90fa3b6974edd8421794")
    version("0.16.3", sha256="16521d8cf062461b158433d820fff509f98fb997ae6c28740eda061d9cba7d5e")

    depends_on("python@3.8:", type=("build", "run"), when="@0.19:")
    depends_on("python@3.7:", type=("build", "run"))
    depends_on("py-poetry-core@1:", type="build")
    depends_on("py-aiofiles", type=("build", "run"))
    depends_on("py-blinker@1.6:", type=("build", "run"), when="@0.19:")
    depends_on("py-blinker", type=("build", "run"))
    depends_on("py-click@8.0.0:", type=("build", "run"), when="@0.18.1:")
    depends_on("py-click", type=("build", "run"))
    depends_on("py-flask@3.0.0:", type=("build", "run"), when="@0.19:")
    depends_on("py-hypercorn@0.11.2:", type=("build", "run"))
    depends_on("py-itsdangerous", type=("build", "run"))
    depends_on("py-jinja2", type=("build", "run"))
    depends_on("py-markupsafe", type=("build", "run"), when="@0.17:")
    depends_on("py-werkzeug@3:", type=("build", "run"), when="@0.19:")
    depends_on("py-werkzeug@2:", type=("build", "run"))
    depends_on("py-importlib-metadata", type=("build", "run"), when="@0.18: ^python@:3.9")
    depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7")
    depends_on("py-typing-extensions", type=("build", "run"), when="@0.19: ^python@:3.9")
    depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.7")

    # Historical dependencies
    depends_on("py-toml", type=("build", "run"), when="@:0.17")

    def url_for_version(self, version):
        url = "https://files.pythonhosted.org/packages/source/q/quart/{}-{}.tar.gz"
        if self.spec.satisfies("@:0.18.3"):
            name = "Quart"
        else:
            name = "quart"
        return url.format(name, version)