From d1e9d8fb2e693242dd76e186f7683c3682fd1b13 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Oct 2022 22:00:28 +0100 Subject: [PATCH] python310Packages.editdistance: disable on older Python releases --- .../python-modules/editdistance/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/editdistance/default.nix b/pkgs/development/python-modules/editdistance/default.nix index 377c044e0c25..41d4a5003424 100644 --- a/pkgs/development/python-modules/editdistance/default.nix +++ b/pkgs/development/python-modules/editdistance/default.nix @@ -3,29 +3,38 @@ , fetchFromGitHub , pytestCheckHook , cython +, pythonOlder }: buildPythonPackage rec { pname = "editdistance"; version = "0.6.1"; + format = "setuptools"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "roy-ht"; repo = pname; rev = "v${version}"; - sha256 = "sha256-c0TdH1nJAKrepatCSCTLaKsDv9NKruMQadCjclKGxBw="; + hash = "sha256-c0TdH1nJAKrepatCSCTLaKsDv9NKruMQadCjclKGxBw="; }; - nativeBuildInputs = [ cython ]; + nativeBuildInputs = [ + cython + ]; preBuild = '' cythonize --inplace editdistance/bycython.pyx ''; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "editdistance" ]; + pythonImportsCheck = [ + "editdistance" + ]; meta = with lib; { description = "Python implementation of the edit distance (Levenshtein distance)";