2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPyPy, pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy, zlib, netcdf, hdf5, curl, libjpeg, cython, cftime
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "netCDF4";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-le+jc9mj4c0N9xk+duZoDZ7KKOYAl8qBOa/qikNGumM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cftime
|
|
|
|
numpy
|
|
|
|
zlib
|
|
|
|
netcdf
|
|
|
|
hdf5
|
|
|
|
curl
|
|
|
|
libjpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test test/tst_*.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests need fixing.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Variables used to configure the build process
|
|
|
|
USE_NCCONFIG="0";
|
|
|
|
HDF5_DIR = lib.getDev hdf5;
|
|
|
|
NETCDF4_DIR=netcdf;
|
|
|
|
CURL_DIR=curl.dev;
|
|
|
|
JPEG_DIR=libjpeg.dev;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Interface to netCDF library (versions 3 and 4)";
|
|
|
|
homepage = "https://pypi.python.org/pypi/netCDF4";
|
|
|
|
license = licenses.free; # Mix of license (all MIT* like)
|
|
|
|
};
|
|
|
|
}
|