2022-01-27 00:19:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, cython
|
2022-01-27 00:19:43 +00:00
|
|
|
, fetchPypi
|
2022-11-21 17:40:18 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2022-01-27 00:19:43 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cftime";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "1.6.2";
|
2022-01-27 00:19:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-hhTAD7ilBG3jBP3Ybb0iT5lAgYXXskWsZijQJ2WW5tI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Fix test_num2date_precision by checking per platform precision
|
|
|
|
url = "https://github.com/Unidata/cftime/commit/221ff2195d588a43a7984597033b678f330fbc41.patch";
|
|
|
|
hash = "sha256-3XTJuET20g9QElM/8WGnNzJBFZ0oUN4ikhWKppwcyNM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cftime"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Time-handling functionality from netcdf4-python";
|
2022-01-27 00:19:43 +00:00
|
|
|
homepage = "https://github.com/Unidata/cftime";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
}
|