From 12de17280d88359f760c0143a9dc9dd8ad749342 Mon Sep 17 00:00:00 2001 From: Moritz-Alexander-Kern <moritz.kern@ymail.com> Date: Wed, 15 Nov 2023 16:47:18 +0100 Subject: [PATCH] add holoviews spack package --- packages/py-holoviews/package.py | 38 ++++++++++++++++++++++++++++++++ spack.yaml | 1 + 2 files changed, 39 insertions(+) create mode 100644 packages/py-holoviews/package.py diff --git a/packages/py-holoviews/package.py b/packages/py-holoviews/package.py new file mode 100644 index 00000000..67c2848a --- /dev/null +++ b/packages/py-holoviews/package.py @@ -0,0 +1,38 @@ + +# 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 PyHoloviews(PythonPackage): + """HoloViews is an open-source Python library designed to make data analysis and visualization seamless and simple.""" + + homepage = "https://holoviews.org/" + pypi = "holoviews/holoviews-1.18.0.tar.gz" + + maintainers = [''] + + version('1.18.0', sha256='bab72961ab7a18794db269351d905523f2aadcad593b321512927ce93dc9df91') + + depends_on('python@3.7:3.10', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-pyct', type='build') + depends_on('py-matplotlib', type=('build','run')) + depends_on('py-bokeh', type=('build','run')) + depends_on('py-jupyterlab-widgets', type="run") + depends_on('py-ipywidgets', type="run") + + + depends_on("py-pytest", type=("test")) + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + # run tests + # TODO: replace if clause with @run_after('install', when='@1.18.0:') after update to Spack v0.19 + if self.spec.version >= Version('1.18.0'): + pytest = which('pytest') + pytest() \ No newline at end of file diff --git a/spack.yaml b/spack.yaml index ef79cebf..4a95b403 100644 --- a/spack.yaml +++ b/spack.yaml @@ -29,6 +29,7 @@ spack: - py-hbp-neuromorphic-platform@0.11.0 - py-hbp-validation-client@0.8.2 - py-hippounit@1.3.6 + - py-holoviews@1.18.0 - py-lfpy@2.3 - py-lfpykit@0.5.1 - py-libsonata@0.1.23 -- GitLab