New package: py-hist and it's dependencies (#27914)

* New package: py-hist and it's dependencies

* Update var/spack/repos/builtin/packages/py-hist/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update var/spack/repos/builtin/packages/py-histoprint/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update var/spack/repos/builtin/packages/py-mplhep/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update py-hist recipe

* Update package.py

* Fix py-iminuit recipe (requires py-cmake now)

* Update package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
iarspider 2021-12-10 19:31:22 +01:00 committed by GitHub
parent 363a263114
commit d5773ac5bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# 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 PyHist(PythonPackage):
"""Hist classes and utilities"""
homepage = "https://github.com/scikit-hep/hist"
pypi = "hist/hist-2.5.2.tar.gz"
version('2.5.2', sha256='0bafb8b956cc041f1b26e8f5663fb8d3b8f7673f56336facb84d8cfdc30ae2cf')
variant('plot', default='False',
description='Add support for drawing histograms')
depends_on('python@3.7:', type=('build', 'run'))
depends_on('py-setuptools@45:', type='build')
depends_on('py-setuptools-scm@3.4:+toml', type='build')
depends_on('py-boost-histogram@1.2.0:1.2', type=('build', 'run'))
depends_on('py-histoprint@2.2.0:', type=('build', 'run'))
depends_on('py-numpy@1.14.5:', type=('build', 'run'))
depends_on('py-typing-extensions@3.7:', type=('build', 'run'), when='^python@:3.7')
depends_on('py-matplotlib@3.0:', type=('build', 'run'), when='+plot')
depends_on('py-scipy@1.4:', type=('build', 'run'), when='+plot')
depends_on('py-iminuit@2:', type=('build', 'run'), when='+plot')
depends_on('py-mplhep@0.2.16:', type=('build', 'run'), when='+plot')

View file

@ -0,0 +1,22 @@
# 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 PyHistoprint(PythonPackage):
"""Pretty print of NumPy (and other) histograms to the console"""
homepage = "https://github.com/scikit-hep/histoprint"
pypi = "histoprint/histoprint-2.2.0.tar.gz"
version('2.2.0', sha256='ef8b65f7926aaa989f076857b76291175245dd974804b408483091d1e28b00f6')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools@42:', type='build')
depends_on('py-setuptools-scm@3.4:+toml', type='build')
depends_on('py-click@7.0.0:', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run'))
depends_on('py-uhi@0.2.1:', type=('build', 'run'))

View file

@ -22,3 +22,4 @@ class PyIminuit(PythonPackage):
depends_on('py-setuptools', type='build')
depends_on('py-numpy', type=('build', 'run'), when='@1.3:1.3.6')
depends_on('py-numpy@1.11.3:', type=('build', 'run'), when='@1.3.7:')
depends_on('py-cmake', type='build', when='@2.8.4')

View file

@ -0,0 +1,19 @@
# 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 PyMplhepData(PythonPackage):
"""Font (Data) sub-package for mplhep"""
homepage = "https://github.com/Scikit-HEP/mplhep_data"
pypi = "mplhep_data/mplhep_data-0.0.3.tar.gz"
version('0.0.3', sha256='b54d257f3f53c93a442cda7a6681ce267277e09173c0b41fd78820f78321772f')
depends_on('python@3.7:', type=('build', 'run'))
depends_on('py-setuptools@42:', type='build')
depends_on('py-setuptools-scm@3.4:+toml', type='build')

View file

@ -0,0 +1,23 @@
# 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 PyMplhep(PythonPackage):
"""Matplotlib styles for HEP"""
homepage = "https://github.com/scikit-hep/mplhep"
pypi = "mplhep/mplhep-0.3.15.tar.gz"
version('0.3.15', sha256='595f796ea65930094e86a805214e0d44537ead267a7487ae16eda02d1670653e')
depends_on('python@3.7:', type=('build', 'run'))
depends_on('py-setuptools@39.2:', type='build')
depends_on('py-mplhep-data', type=('build', 'run'))
depends_on('py-matplotlib@3.4:', type=('build', 'run'))
depends_on('py-numpy@1.16.0:', type=('build', 'run'))
depends_on('py-packaging', type=('build', 'run'))
depends_on('py-uhi@0.2.0:', type=('build', 'run'))

View file

@ -0,0 +1,22 @@
# 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 PyUhi(PythonPackage):
"""Unified Histogram Interface:
tools to help library authors work with histograms"""
homepage = "https://github.com/Scikit-HEP/uhi"
pypi = "uhi/uhi-0.3.0.tar.gz"
version('0.3.0', sha256='3f441bfa89fae11aa762ae1ef1b1b454362d228e9084477773ffb82d6e9f5d2c')
depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-numpy@1.13.3:', type=('build', 'run'))
depends_on('py-typing-extensions@3.7:', type=('build', 'run'), when='^python@:3.7')
depends_on('py-setuptools', type='build')
# depends_on('py-poetry-core@1:', type='build') -- WIP