From 01fd90232dc5d08901a35ab25b81dc8e5ad022ae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 25 Jan 2022 14:41:30 +0100 Subject: [PATCH] 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; [ ]; }; - }