summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-pynio/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/py-pynio/package.py')
-rw-r--r--var/spack/repos/builtin/packages/py-pynio/package.py45
1 files changed, 23 insertions, 22 deletions
diff --git a/var/spack/repos/builtin/packages/py-pynio/package.py b/var/spack/repos/builtin/packages/py-pynio/package.py
index 9d796b56d4..71068048be 100644
--- a/var/spack/repos/builtin/packages/py-pynio/package.py
+++ b/var/spack/repos/builtin/packages/py-pynio/package.py
@@ -8,26 +8,26 @@ from spack.package import *
class PyPynio(PythonPackage):
"""PyNIO ("pie-nee-oh") is a Python module that allows read and/or
- write access to a variety of scientific data formats popular in
- climate and weather"""
+ write access to a variety of scientific data formats popular in
+ climate and weather"""
homepage = "https://www.pyngl.ucar.edu/Nio.shtml"
url = "https://github.com/NCAR/pynio/archive/1.5.4.tar.gz"
- version('1.5.4', sha256='e5bb57d902740d25e4781a9f89e888149f55f2ffe60f9a5ad71069f017c89e1a')
+ version("1.5.4", sha256="e5bb57d902740d25e4781a9f89e888149f55f2ffe60f9a5ad71069f017c89e1a")
- variant('hdf5', default=False, description='Include HDF5 support')
- variant('gdal', default=False, description='Include GDAL support')
+ variant("hdf5", default=False, description="Include HDF5 support")
+ variant("gdal", default=False, description="Include GDAL support")
# The setup.py claims it requires these abolutely.
- depends_on('libpng')
- depends_on('jpeg')
- depends_on('zlib')
+ depends_on("libpng")
+ depends_on("jpeg")
+ depends_on("zlib")
# Spack does not currently have netcdf below 4.x, and 3.x is a
# fundamentally different format. So, currently this is only providing
# support for netcdf4.
- depends_on('netcdf-c@3.6.0:')
+ depends_on("netcdf-c@3.6.0:")
# Turning on the hdf (i.e. hdf4) dependency causes it not to build, with
# compile errors that (weirdly) relate to the declarations of HDF5.
@@ -36,36 +36,37 @@ class PyPynio(PythonPackage):
# depends_on('hdf', when='+hdf4')
# This one works, though.
- depends_on('hdf5', when='+hdf5')
+ depends_on("hdf5", when="+hdf5")
# Turning on the GDAL dependency apparently forces it to link with
# -ljasper, meaning that really it depends on gdal+jasper. In my view
# it should not need this unless one were specifically using PyNio to
# use GDAL to read JPEG-2000 files, but it seems to be hard-wired
# in PyNio's setup.py.
- depends_on('gdal+jasper', when='+gdal')
+ depends_on("gdal+jasper", when="+gdal")
# I have left off a few other optional dependencies, as they are not yet
# in Spack. HDFEOS, HDFEOS5, GRIB. See the pynio setup.py for details.
# pip silently replaces distutils with setuptools
- depends_on('py-setuptools', type='build')
- depends_on('py-numpy', type=('build', 'run'))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
def setup_build_environment(self, env):
"""
These environment variables are how the setup.py knows which options
to turn on, and how to find them.
"""
- env.set('F2CLIBS', 'gfortran')
- env.set('HAS_NETCDF4', '1')
- env.set('NETCDF4_PREFIX', self.spec['netcdf-c'].prefix)
- if '+hdf5' in self.spec:
- env.set('HAS_HDF5', '1')
- env.set('HDF5_PREFIX', self.spec['hdf5'].prefix)
- if '+gdal' in self.spec:
- env.set('HAS_GDAL', '1')
- env.set('GDAL_PREFIX', self.spec['gdal'].prefix)
+ env.set("F2CLIBS", "gfortran")
+ env.set("HAS_NETCDF4", "1")
+ env.set("NETCDF4_PREFIX", self.spec["netcdf-c"].prefix)
+ if "+hdf5" in self.spec:
+ env.set("HAS_HDF5", "1")
+ env.set("HDF5_PREFIX", self.spec["hdf5"].prefix)
+ if "+gdal" in self.spec:
+ env.set("HAS_GDAL", "1")
+ env.set("GDAL_PREFIX", self.spec["gdal"].prefix)
+
# This one is trouble - see comments above.
# if '+hdf4' in self.spec: