1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-04 06:42:33 +03:00
nixpkgs/pkgs/development/python-modules/cftime/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.1 KiB
Nix
Raw Normal View History

2022-01-25 14:41:30 +01:00
{ lib
, buildPythonPackage
2018-06-22 12:22:42 +02:00
, cython
2022-01-25 14:41:30 +01:00
, fetchPypi
, fetchpatch
2018-06-22 12:22:42 +02:00
, numpy
2022-01-25 14:41:30 +01:00
, pytestCheckHook
, pythonOlder
2018-06-22 12:22:42 +02:00
}:
buildPythonPackage rec {
pname = "cftime";
version = "1.6.2";
2022-01-25 14:41:30 +01:00
format = "setuptools";
disabled = pythonOlder "3.7";
2018-06-22 12:22:42 +02:00
src = fetchPypi {
inherit pname version;
hash = "sha256-hhTAD7ilBG3jBP3Ybb0iT5lAgYXXskWsZijQJ2WW5tI=";
2018-06-22 12:22:42 +02: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-11-19 21:40:32 +01:00
nativeBuildInputs = [
cython
numpy
];
propagatedBuildInputs = [
numpy
];
2022-01-25 14:41:30 +01:00
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"cftime"
];
2018-06-22 12:22:42 +02:00
2022-01-25 14:41:30 +01:00
meta = with lib; {
2018-06-22 12:22:42 +02:00
description = "Time-handling functionality from netcdf4-python";
2022-01-25 14:41:30 +01:00
homepage = "https://github.com/Unidata/cftime";
license = licenses.mit;
maintainers = with maintainers; [ ];
2018-06-22 12:22:42 +02:00
};
2020-08-25 12:07:09 +10:00
}