From f6006445dad62153bec11481106b3cb61bf249d7 Mon Sep 17 00:00:00 2001 From: Sam Grayson Date: Fri, 13 Jan 2023 16:07:39 -0700 Subject: [PATCH] Add parsl-monitoring (#34769) * Add packages * Style * Respond to comments * Change conflct dep type Co-authored-by: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../packages/py-flask-sqlalchemy/package.py | 25 +++++++++++++++++++ .../builtin/packages/py-parsl/package.py | 19 ++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py diff --git a/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py new file mode 100644 index 0000000000..bb2a9dd04e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2022 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 PyFlaskSqlalchemy(PythonPackage): + """ + Add SQLAlchemy support to your Flask application. + """ + + homepage = "https://github.com/pallets-eco/flask-sqlalchemy" + pypi = "flask-sqlalchemy/Flask-SQLAlchemy-3.0.2.tar.gz" + + maintainers = ["charmoniumq"] + + version("3.0.2", sha256="16199f5b3ddfb69e0df2f52ae4c76aedbfec823462349dabb21a1b2e0a2b65e9") + + # https://github.com/pallets-eco/flask-sqlalchemy/blob/3.0.2/pyproject.toml + depends_on("python@3.7:", type=("build", "run")) + depends_on("py-flask@2.2:", type=("build", "run")) + depends_on("py-sqlalchemy@1.4.18:", type=("build", "run")) + depends_on("py-pdm-pep517@1:", type="build") diff --git a/var/spack/repos/builtin/packages/py-parsl/package.py b/var/spack/repos/builtin/packages/py-parsl/package.py index 2542881a43..8d01d58ce9 100644 --- a/var/spack/repos/builtin/packages/py-parsl/package.py +++ b/var/spack/repos/builtin/packages/py-parsl/package.py @@ -18,6 +18,13 @@ class PyParsl(PythonPackage): version("1.1.0", sha256="6a623d3550329f028775950d23a2cafcb0f82b199f15940180410604aa5d102c") + variant( + "monitoring", + default=False, + description="enable live monitoring", + ) + # See https://parsl.readthedocs.io/en/stable/userguide/monitoring.html + depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-pyzmq@17.1.2:", type=("build", "run")) @@ -29,3 +36,15 @@ class PyParsl(PythonPackage): depends_on("py-requests", type=("build", "run")) depends_on("py-paramiko", type=("build", "run")) depends_on("py-psutil@5.5.1:", type=("build", "run")) + + with when("+monitoring"): + depends_on("py-sqlalchemy@1.3", type=("build", "run")) + conflicts("^py-sqlalchemy@1.3.4") + depends_on("py-sqlalchemy-utils", type=("build", "run")) + depends_on("py-pydot", type=("build", "run")) + depends_on("py-networkx", type=("build", "run")) + depends_on("py-flask@1.0.2:", type=("build", "run")) + depends_on("py-flask-sqlalchemy", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-plotly", type=("build", "run")) + depends_on("py-python-daemon", type=("build", "run"))