diff --git a/pkgs/development/python-modules/textdistance/default.nix b/pkgs/development/python-modules/textdistance/default.nix index 79e33942424a..7c01f93ae7ed 100644 --- a/pkgs/development/python-modules/textdistance/default.nix +++ b/pkgs/development/python-modules/textdistance/default.nix @@ -2,28 +2,42 @@ lib, buildPythonPackage, fetchPypi, + setuptools, + pytestCheckHook, + hypothesis, + numpy, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "textdistance"; version = "4.6.3"; - format = "setuptools"; + pyproject = true; + + __structuredAttrs = true; src = fetchPypi { - inherit pname version; + pname = "textdistance"; + inherit (finalAttrs) version; hash = "sha256-1tq8ULTqgyzc8OHmAhvQx/zZreFViI15u2o8Mfzi3G8="; }; - # There aren't tests - doCheck = false; + build-system = [ setuptools ]; + + nativeCheckInputs = [ + pytestCheckHook + hypothesis + numpy + ]; + + disabledTestPaths = [ "tests/test_external.py" ]; pythonImportsCheck = [ "textdistance" ]; meta = { description = "Python library for comparing distance between two or more sequences"; homepage = "https://github.com/life4/textdistance"; - changelog = "https://github.com/life4/textdistance/releases/tag/${version}"; + changelog = "https://github.com/life4/textdistance/releases/tag/${finalAttrs.version}"; license = lib.licenses.mit; maintainers = [ ]; }; -} +})