summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-05-27 22:14:44 -0500
committerGitHub <noreply@github.com>2021-05-28 03:14:44 +0000
commit850cac5ea3f041e9feab79f6848f98f960fc4a32 (patch)
tree4a496e24daf533961723531be443322a6c323584 /var
parente2399bcd0e1160adbdff862b5a005515c46c39c8 (diff)
downloadspack-850cac5ea3f041e9feab79f6848f98f960fc4a32.tar.gz
spack-850cac5ea3f041e9feab79f6848f98f960fc4a32.tar.bz2
spack-850cac5ea3f041e9feab79f6848f98f960fc4a32.tar.xz
spack-850cac5ea3f041e9feab79f6848f98f960fc4a32.zip
py-cfgrib: add new version (#23916)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-cfgrib/package.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/py-cfgrib/package.py b/var/spack/repos/builtin/packages/py-cfgrib/package.py
index db9a09669c..31bc473547 100644
--- a/var/spack/repos/builtin/packages/py-cfgrib/package.py
+++ b/var/spack/repos/builtin/packages/py-cfgrib/package.py
@@ -13,12 +13,27 @@ class PyCfgrib(PythonPackage):
homepage = "https://github.com/ecmwf/cfgrib"
pypi = "cfgrib/cfgrib-0.9.8.5.tar.gz"
+ version('0.9.9.0', sha256='6ff0227df9c5ee34aa7d6ab1f7af3fbe6838523a8a9891c74040b419b03ad289')
version('0.9.8.5', sha256='07c224d7ac823a1df5738b96b9d3621515538f51f67e55044f9cc8ec1668e1bd')
+ # Warning: can create infinite dependency loop with xarray+io ^cfgrib+xarray
+ variant('xarray', default=False, description='Add xarray support')
+
depends_on('python@3.5:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
- depends_on('py-pytest-runner', type='build')
+ depends_on('py-pytest-runner', when='@0.9.8.5', type='build')
depends_on('py-attrs@19.2:', type=('build', 'run'))
- depends_on('py-cffi', type=('build', 'run'))
+ depends_on('py-cffi', when='@0.9.8.5', type=('build', 'run'))
depends_on('py-click', type=('build', 'run'))
+ depends_on('py-eccodes', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-xarray@0.12.0:', when='+xarray', type=('build', 'run'))
+
+ @property
+ def import_modules(self):
+ modules = ['cfgrib']
+
+ if '+xarray' in self.spec:
+ modules.append('cf2cdm')
+
+ return modules