From 2d78ec7c67dc535e061967de9b0f32f4d967fa0c Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sat, 9 Nov 2024 01:27:03 +0800 Subject: [PATCH] python312Packages.simplemma: fix build --- .../python-modules/simplemma/default.nix | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/simplemma/default.nix b/pkgs/development/python-modules/simplemma/default.nix index fc1502fa02a8..191fbb5df796 100644 --- a/pkgs/development/python-modules/simplemma/default.nix +++ b/pkgs/development/python-modules/simplemma/default.nix @@ -1,18 +1,19 @@ { lib, buildPythonPackage, - pythonOlder, fetchFromGitHub, - + setuptools, + marisa-trie, + platformdirs, + pytest, + pytest-cov-stub, pytestCheckHook, }: buildPythonPackage rec { pname = "simplemma"; version = "1.1.1"; - format = "setuptools"; - - disabled = pythonOlder "3.6"; + pyproject = true; src = fetchFromGitHub { owner = "adbar"; @@ -21,14 +22,28 @@ buildPythonPackage rec { hash = "sha256-X0mqFPdCo0/sTexv4bi4bND7LFHOJvlOPH6tB39ybZY="; }; - nativeCheckInputs = [ pytestCheckHook ]; + build-system = [ + setuptools + ]; + + optional-dependencies = { + marisa-trie = [ + marisa-trie + platformdirs + ]; + }; + + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "simplemma" ]; - meta = with lib; { + meta = { description = "Simple multilingual lemmatizer for Python, especially useful for speed and efficiency"; homepage = "https://github.com/adbar/simplemma"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; }; }