From 7858a2f05c9ff9a6ca013ec657068b0df0468b65 Mon Sep 17 00:00:00 2001 From: Charles Doutriaux Date: Thu, 11 Nov 2021 17:20:23 -0800 Subject: Adds Sina Python Package to Spack (#27219) --- .../repos/builtin/packages/py-sina/no_orjson.patch | 15 ++++++++ .../repos/builtin/packages/py-sina/package.py | 44 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-sina/no_orjson.patch create mode 100644 var/spack/repos/builtin/packages/py-sina/package.py diff --git a/var/spack/repos/builtin/packages/py-sina/no_orjson.patch b/var/spack/repos/builtin/packages/py-sina/no_orjson.patch new file mode 100644 index 0000000000..de937f4157 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-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-sina/package.py b/var/spack/repos/builtin/packages/py-sina/package.py new file mode 100644 index 0000000000..deb46cd2ff --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sina/package.py @@ -0,0 +1,44 @@ +# 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 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