From 9b9954fccc894c93946c4b1cb9b7c101b434c9fa Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 24 Jan 2022 21:23:06 +0000 Subject: [PATCH 1/2] python310Packages.cftime: 1.5.1.1 -> 1.5.2 --- pkgs/development/python-modules/cftime/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cftime/default.nix b/pkgs/development/python-modules/cftime/default.nix index aeebc762701f..04eee5d9bc4b 100644 --- a/pkgs/development/python-modules/cftime/default.nix +++ b/pkgs/development/python-modules/cftime/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "cftime"; - version = "1.5.1.1"; + version = "1.5.2"; src = fetchPypi { inherit pname version; - sha256 = "6dc4d76ec7fe5a2d3c00dbe6604c757f1319613b75ef157554ef3648bf102a50"; + sha256 = "375d37d9ab8bf501c048e44efce2276296e3d67bb276e891e0e93b0a8bbb988a"; }; checkInputs = [ From 01fd90232dc5d08901a35ab25b81dc8e5ad022ae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 25 Jan 2022 14:41:30 +0100 Subject: [PATCH 2/2] python3Packages.cftime: enable tests --- .../python-modules/cftime/default.nix | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/cftime/default.nix b/pkgs/development/python-modules/cftime/default.nix index 04eee5d9bc4b..3991dc6bf685 100644 --- a/pkgs/development/python-modules/cftime/default.nix +++ b/pkgs/development/python-modules/cftime/default.nix @@ -1,27 +1,24 @@ -{ buildPythonPackage -, fetchPypi -, pytestCheckHook -, coveralls -, pytest-cov +{ lib +, buildPythonPackage , cython +, fetchPypi , numpy +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "cftime"; version = "1.5.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; sha256 = "375d37d9ab8bf501c048e44efce2276296e3d67bb276e891e0e93b0a8bbb988a"; }; - checkInputs = [ - pytestCheckHook - coveralls - pytest-cov - ]; - nativeBuildInputs = [ cython numpy @@ -31,11 +28,22 @@ buildPythonPackage rec { numpy ]; - # ERROR test/test_cftime.py - ModuleNotFoundError: No module named 'cftime._cft... - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; - meta = { + postPatch = '' + sed -i "/--cov/d" setup.cfg + ''; + + pythonImportsCheck = [ + "cftime" + ]; + + meta = with lib; { description = "Time-handling functionality from netcdf4-python"; + homepage = "https://github.com/Unidata/cftime"; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; - }