Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / cftime / default.nix
blobb827c48531aa966faeed02097f1420b11d8f91a2
1 { lib
2 , buildPythonPackage
3 , cython
4 , fetchPypi
5 , fetchpatch
6 , numpy
7 , pytestCheckHook
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "cftime";
13   version = "1.6.2";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-hhTAD7ilBG3jBP3Ybb0iT5lAgYXXskWsZijQJ2WW5tI=";
21   };
23   patches = [
24     (fetchpatch {
25       # Fix test_num2date_precision by checking per platform precision
26       url = "https://github.com/Unidata/cftime/commit/221ff2195d588a43a7984597033b678f330fbc41.patch";
27       hash = "sha256-3XTJuET20g9QElM/8WGnNzJBFZ0oUN4ikhWKppwcyNM=";
28     })
29   ];
31   postPatch = ''
32     sed -i "/--cov/d" setup.cfg
33   '';
36   nativeBuildInputs = [
37     cython
38     numpy
39   ];
41   propagatedBuildInputs = [
42     numpy
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47   ];
49   pythonImportsCheck = [
50     "cftime"
51   ];
53   meta = with lib; {
54     description = "Time-handling functionality from netcdf4-python";
55     homepage = "https://github.com/Unidata/cftime";
56     license = licenses.mit;
57     maintainers = with maintainers; [ ];
58   };