at 23.11-beta 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, cython 4, fetchPypi 5, fetchpatch 6, numpy 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "cftime"; 13 version = "1.6.2"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-hhTAD7ilBG3jBP3Ybb0iT5lAgYXXskWsZijQJ2WW5tI="; 21 }; 22 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 ]; 30 31 postPatch = '' 32 sed -i "/--cov/d" setup.cfg 33 ''; 34 35 36 nativeBuildInputs = [ 37 cython 38 numpy 39 ]; 40 41 propagatedBuildInputs = [ 42 numpy 43 ]; 44 45 nativeCheckInputs = [ 46 pytestCheckHook 47 ]; 48 49 pythonImportsCheck = [ 50 "cftime" 51 ]; 52 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 }; 59}