diff --git a/packages/py-holoviews/package.py b/packages/py-holoviews/package.py new file mode 100644 index 0000000000000000000000000000000000000000..67c2848a4e0260ea56cc51a0a27e2e2fd4a69326 --- /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 ef79cebf5e2ef4efbe13cddbd786df9a3815b4e0..4a95b4038fc3a783e33e03ce9d6a2a7e5dea1937 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