From 192f5cf66d835969f8e6a9fd29fb1542ae8272da Mon Sep 17 00:00:00 2001 From: Charles Doutriaux Date: Wed, 19 Jan 2022 08:14:31 -0800 Subject: Adding Kosh python package v2.0 (#28426) --- .../repos/builtin/packages/py-kosh/package.py | 28 ++++++++++++++ .../builtin/packages/py-llnl-sina/no_orjson.patch | 15 ++++++++ .../repos/builtin/packages/py-llnl-sina/package.py | 44 ++++++++++++++++++++++ .../repos/builtin/packages/py-sina/no_orjson.patch | 15 -------- .../repos/builtin/packages/py-sina/package.py | 44 ---------------------- 5 files changed, 87 insertions(+), 59 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-kosh/package.py create mode 100644 var/spack/repos/builtin/packages/py-llnl-sina/no_orjson.patch create mode 100644 var/spack/repos/builtin/packages/py-llnl-sina/package.py delete mode 100644 var/spack/repos/builtin/packages/py-sina/no_orjson.patch delete mode 100644 var/spack/repos/builtin/packages/py-sina/package.py diff --git a/var/spack/repos/builtin/packages/py-kosh/package.py b/var/spack/repos/builtin/packages/py-kosh/package.py new file mode 100644 index 0000000000..22ba0bdf49 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-kosh/package.py @@ -0,0 +1,28 @@ +# 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 PyKosh(PythonPackage): + """ + Kosh allows codes to store, query, share data via an easy-to-use Python API. + Kosh lies on top of Sina and can use any database backend supported by Sina. + In adition Kosh aims to make data access and sharing as simple as possible. + """ + + homepage = "https://github.com/LLNL/kosh" + url = "https://github.com/LLNL/kosh/archive/refs/tags/v2.0.tar.gz" + + # notify when the package is updated. + maintainers = ['doutriaux1'] + + version('2.0', sha256='059e431e3d3219b53956cb464d9e10933ca141dc89662f55d9c633e35c8b3a1e') + + depends_on('py-setuptools', type='build') + depends_on("py-llnl-sina@1.11", type=("build", "run")) + depends_on("py-networkx", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-llnl-sina/no_orjson.patch b/var/spack/repos/builtin/packages/py-llnl-sina/no_orjson.patch new file mode 100644 index 0000000000..de937f4157 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-llnl-sina/no_orjson.patch @@ -0,0 +1,15 @@ +--- a/python/setup.py ++++ b/python/setup.py +@@ -51,9 +51,7 @@ setup(name='llnl-sina', + 'six', + 'sqlalchemy', + 'enum34;python_version<"3.4"', +- 'orjson;python_version>="3.6" and platform_machine!="ppc64le"', +- 'ujson;python_version>="3.6" and platform_machine=="ppc64le"', +- 'ujson<4;python_version<"3.6" and platform_machine!="ppc64le"', ++ 'ujson', + ], + license='MIT', + classifiers=[ + + diff --git a/var/spack/repos/builtin/packages/py-llnl-sina/package.py b/var/spack/repos/builtin/packages/py-llnl-sina/package.py new file mode 100644 index 0000000000..c7c01757e3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-llnl-sina/package.py @@ -0,0 +1,44 @@ +# 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 import * + + +class PyLlnlSina(PythonPackage): + """Sina allows codes to store, query, and visualize their data through an + easy-to-use Python API. Data that fits its recognized schema can be ingested + into one or more supported backends. + Sina's API is independent of backend and gives users the benefits of a database + without requiring knowledge of one, allowing queries to be expressed in pure + Python. Visualizations are also provided through Python. + + Sina is intended especially for use with run metadata, + allowing users to easily and efficiently find simulation runs that match some + criteria. + """ + + homepage = "https://github.com/LLNL/Sina" + git = "https://github.com/LLNL/Sina.git" + + # notify when the package is updated. + maintainers = [ + 'HaluskaR', + 'estebanpauli', + 'murray55', + 'doutriaux1', + ] + version('1.11.0', tag="v1.11.0") + version('1.10.0', tag="v1.10.0") + + # let's remove dependency on orjson + patch('no_orjson.patch') + depends_on('py-setuptools', type='build') + depends_on('py-enum34', when='^python@:3.3', type=('build', 'run')) + depends_on('py-ujson', type=('build', 'run')) + depends_on("py-sqlalchemy", type=("build", "run")) + depends_on("py-six", type=("build", "run")) + + build_directory = 'python' diff --git a/var/spack/repos/builtin/packages/py-sina/no_orjson.patch b/var/spack/repos/builtin/packages/py-sina/no_orjson.patch deleted file mode 100644 index de937f4157..0000000000 --- a/var/spack/repos/builtin/packages/py-sina/no_orjson.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/python/setup.py -+++ b/python/setup.py -@@ -51,9 +51,7 @@ setup(name='llnl-sina', - 'six', - 'sqlalchemy', - 'enum34;python_version<"3.4"', -- 'orjson;python_version>="3.6" and platform_machine!="ppc64le"', -- 'ujson;python_version>="3.6" and platform_machine=="ppc64le"', -- 'ujson<4;python_version<"3.6" and platform_machine!="ppc64le"', -+ 'ujson', - ], - license='MIT', - classifiers=[ - - diff --git a/var/spack/repos/builtin/packages/py-sina/package.py b/var/spack/repos/builtin/packages/py-sina/package.py deleted file mode 100644 index 845a783d04..0000000000 --- a/var/spack/repos/builtin/packages/py-sina/package.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 import * - - -class PySina(PythonPackage): - """Sina allows codes to store, query, and visualize their data through an - easy-to-use Python API. Data that fits its recognized schema can be ingested - into one or more supported backends. - Sina's API is independent of backend and gives users the benefits of a database - without requiring knowledge of one, allowing queries to be expressed in pure - Python. Visualizations are also provided through Python. - - Sina is intended especially for use with run metadata, - allowing users to easily and efficiently find simulation runs that match some - criteria. - """ - - homepage = "https://github.com/LLNL/Sina" - git = "https://github.com/LLNL/Sina.git" - - # notify when the package is updated. - maintainers = [ - 'HaluskaR', - 'estebanpauli', - 'murray55', - 'doutriaux1', - ] - version('1.11.0', tag="v1.11.0") - version('1.10.0', tag="v1.10.0") - - # let's remove dependency on orjson - patch('no_orjson.patch') - depends_on('py-setuptools', type='build') - depends_on('py-enum34', when='^python@:3.3', type=('build', 'run')) - depends_on('py-ujson', type=('build', 'run')) - depends_on("py-sqlalchemy", type=("build", "run")) - depends_on("py-six", type=("build", "run")) - - build_directory = 'python' -- cgit v1.2.3-70-g09d2