From 3fefc1bcfffad1e0c2491848c19da9d56a1af977 Mon Sep 17 00:00:00 2001
From: Andrew Davison <andrew.davison@cnrs.fr>
Date: Wed, 5 Oct 2022 17:38:39 +0200
Subject: [PATCH] Add pynwb and dependency

---
 packages/py-hdmf/package.py  | 43 ++++++++++++++++++++++++++++++++++++
 packages/py-pynwb/package.py | 26 ++++++++++++++++++++++
 spack.yaml                   |  2 ++
 3 files changed, 71 insertions(+)
 create mode 100644 packages/py-hdmf/package.py
 create mode 100644 packages/py-pynwb/package.py

diff --git a/packages/py-hdmf/package.py b/packages/py-hdmf/package.py
new file mode 100644
index 00000000..cfca7e7a
--- /dev/null
+++ b/packages/py-hdmf/package.py
@@ -0,0 +1,43 @@
+# 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)
+
+# ----------------------------------------------------------------------------
+# If you submit this package back to Spack as a pull request,
+# please first remove this boilerplate and all FIXME comments.
+#
+# This is a template package file for Spack.  We've put "FIXME"
+# next to all the things you'll want to change. Once you've handled
+# them, you can save this file and test your package like this:
+#
+#     spack install py-hdmf
+#
+# You can edit this file again by typing:
+#
+#     spack edit py-hdmf
+#
+# See the Spack documentation for more information on packaging.
+# ----------------------------------------------------------------------------
+
+from spack.package import *
+
+
+class PyHdmf(PythonPackage):
+    """The Hierarchical Data Modeling Framework."""
+
+    homepage = "https://github.com/hdmf-dev/hdmf"
+    pypi = "hdmf/hdmf-3.4.6.tar.gz"
+
+    maintainers = ["rly"]
+
+    version("3.4.6", sha256="e2fe8a1139bd06787df61b2fac830e1a4359eef60a70d82567d3509609103ca3")
+
+    depends_on("py-setuptools", type="build")
+
+    depends_on("py-h5py@2.10:", type=("build", "run"))
+    depends_on("py-jsonschema@2.6.0:", type=("build", "run"))
+    depends_on("py-numpy@1.16:", type=("build", "run"))
+    depends_on("py-pandas@1.0.5:", type=("build", "run"))
+    depends_on("py-ruamel-yaml@0.16:", type=("build", "run"))
+    depends_on("py-scipy@1.1:", type=("build", "run"))
diff --git a/packages/py-pynwb/package.py b/packages/py-pynwb/package.py
new file mode 100644
index 00000000..39aae17b
--- /dev/null
+++ b/packages/py-pynwb/package.py
@@ -0,0 +1,26 @@
+# 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 PyPynwb(PythonPackage):
+    """A Python API for working with Neurodata stored in the NWB Format."""
+
+    homepage = "https://github.com/NeurodataWithoutBorders/pynwb"
+    pypi = "pynwb/pynwb-2.1.0.tar.gz"
+
+    maintainers = ["bendichter"]
+
+    version("2.1.0", sha256="53161341ff970a99de4f362e7b16034b9661797ad7ed65e062649cc6655f350b")
+
+    depends_on("py-setuptools", type="build")
+
+    depends_on("py-h5py@2.10:", type=("build", "run"))
+    depends_on("py-hdmf@3.4.0:", type=("build", "run"))
+    depends_on("py-numpy@1.16:", type=("build", "run"))
+    depends_on("py-pandas@1.1.5:", type=("build", "run"))
+    depends_on("py-python-dateutil@2.7.3:", type=("build", "run"))
diff --git a/spack.yaml b/spack.yaml
index 8c981047..a033cc19 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -32,6 +32,8 @@ spack:
     - pynn-brainscales@3.0-a1 ^log4cxx@0.10.0 ^googletest@1.11.0:+gmock
     - hxtorch@3.0-a1 ^log4cxx@0.10.0 ^googletest@1.11.0:+gmock
     - py-neo
+    - py-hdmf
+    - py-pynwb
     #- py-cerebstats
     #- py-cerebunit
     - py-cerebrus
-- 
GitLab