summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2021-12-01 15:19:54 -0800
committerGitHub <noreply@github.com>2021-12-01 16:19:54 -0700
commite590ec6f3fc1a7a65d79bd64d264032916747bdf (patch)
treead76dbf4b97f8202d02dbc2ac92defd85b64b515
parent08b00f8804c988d95430ff9087894f9e5c7712cc (diff)
downloadspack-e590ec6f3fc1a7a65d79bd64d264032916747bdf.tar.gz
spack-e590ec6f3fc1a7a65d79bd64d264032916747bdf.tar.bz2
spack-e590ec6f3fc1a7a65d79bd64d264032916747bdf.tar.xz
spack-e590ec6f3fc1a7a65d79bd64d264032916747bdf.zip
Add: openPMD-viewer (#27516)
* Add: openPMD-viewer Add the `py-openpmd-viewer` package. * openPMD-viewer: Improve Variant Control * openPMD-viewer: Update to Source from Pip/PyPA https://spack.readthedocs.io/en/latest/build_systems/pythonpackage.html#pypi-vs-github * Fix style: comment * openPMD-viewer: fix requirements add reviewer feedback
-rw-r--r--var/spack/repos/builtin/packages/py-openpmd-viewer/package.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-openpmd-viewer/package.py b/var/spack/repos/builtin/packages/py-openpmd-viewer/package.py
new file mode 100644
index 0000000000..a348b8b4f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-openpmd-viewer/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2021 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 import *
+
+
+class PyOpenpmdViewer(PythonPackage):
+ """Python visualization tools for openPMD files"""
+
+ homepage = "https://www.openPMD.org"
+ git = "https://github.com/openPMD/openPMD-viewer.git"
+ pypi = 'openPMD-viewer/openPMD-viewer-1.2.0.tar.gz'
+
+ maintainers = ['RemiLehe', 'ax3l']
+
+ version('1.2.0', sha256='a27f8ac522c4c76fd774095e156a8b280c9211128f50aa07f16ac70d8222384d')
+
+ variant('backend', default='h5py,openpmd-api', multi=True,
+ values=('h5py', 'openpmd-api'))
+ variant('jupyter', default=False,
+ description='Enable Jupyter Widget GUI')
+ variant('numba', default=False,
+ description='Enable accelerated depositions for histograms')
+ variant('plot', default=True,
+ description='Enable plotting support')
+ variant('tutorials', default=True,
+ description='Enable dependencies for tutorials')
+
+ depends_on('python@3.5:', type=('build', 'run'))
+ depends_on('py-numpy@1.15:1', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('py-setuptools', type='build')
+ depends_on('py-tqdm', type=('build', 'run'))
+
+ depends_on('py-h5py@2.8.0:', type=('build', 'run'))
+ with when('backend=openpmd-api'):
+ depends_on('openpmd-api +python -mpi', type=('build', 'run'))
+
+ with when('+jupyter'):
+ depends_on('py-ipywidgets', type=('build', 'run'))
+ depends_on('py-jupyter', type=('build', 'run'))
+ depends_on('py-tqdm +notebook', type=('build', 'run'))
+
+ with when('+numba'):
+ depends_on('py-numba', type=('build', 'run'))
+
+ with when('+plot'):
+ depends_on('py-matplotlib', type=('build', 'run'))
+ # missing in Spack:
+ # with when('+jupyter'):
+ # depends_on('py-ipympl', type=('build', 'run'))
+
+ with when('+tutorials'):
+ depends_on('py-wget', type=('build', 'run'))