From c6cf01e66fe90e3684376f281da1b3334650e227 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 11 May 2022 19:20:40 +0200 Subject: [PATCH] python310Packages.zimports: enable tests --- .../python-modules/zimports/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/zimports/default.nix b/pkgs/development/python-modules/zimports/default.nix index 6df2b47be9dc..20e23afcfc01 100644 --- a/pkgs/development/python-modules/zimports/default.nix +++ b/pkgs/development/python-modules/zimports/default.nix @@ -6,22 +6,24 @@ , pyflakes , tomli , setuptools -, mock +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "zimports"; version = "0.6.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "sqlalchemyorg"; repo = "zimports"; rev = "refs/tags/v${version}"; - sha256 = "sha256-qm5mA8pCSLbkupGBo+ppHSW6uy1j/FfV3idvGQGhjqU="; + hash = "sha256-qm5mA8pCSLbkupGBo+ppHSW6uy1j/FfV3idvGQGhjqU="; }; - disabled = !isPy3k; - propagatedBuildInputs = [ flake8-import-order pyflakes @@ -30,14 +32,12 @@ buildPythonPackage rec { ]; checkInputs = [ - mock + pytestCheckHook ]; - checkPhase = '' - runHook preInstallCheck - PYTHONPATH= $out/bin/zimports --help >/dev/null - runHook postInstallCheck - ''; + pythonImportsCheck = [ + "zimports" + ]; meta = with lib; { description = "Python import rewriter";