diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-05-22 19:58:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 19:58:23 +0200 |
commit | 76e5d9322a73578069d2da042d576e99ac309f80 (patch) | |
tree | 92552a483629bfe5c914b3040de46df732346a35 | |
parent | 4d924a6b3376c5e3cae3ba8c971007bf736084c5 (diff) | |
parent | 8f5833f36749cafdc721c976abdc6d1791f302a1 (diff) |
Merge pull request #233412 from natsukium/python3Packages.wordfreq/fix
python3Packages.wordfreq: fix build
-rw-r--r-- | pkgs/development/python-modules/wordfreq/default.nix | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/wordfreq/default.nix b/pkgs/development/python-modules/wordfreq/default.nix index 6adc8b1538e50..5f77c34f98ade 100644 --- a/pkgs/development/python-modules/wordfreq/default.nix +++ b/pkgs/development/python-modules/wordfreq/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, poetry-core , regex , langcodes , ftfy @@ -7,21 +8,27 @@ , mecab-python3 , jieba , pytestCheckHook -, isPy27 +, pythonOlder , fetchFromGitHub }: buildPythonPackage rec { pname = "wordfreq"; version = "3.0.2"; - disabled = isPy27; + format = "pyproject"; - src = fetchFromGitHub { - owner = "LuminosoInsight"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "rspeer"; repo = "wordfreq"; rev = "refs/tags/v${version}"; hash = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE="; - }; + }; + + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ regex @@ -32,10 +39,6 @@ buildPythonPackage rec { jieba ]; - postPatch = '' - substituteInPlace setup.py --replace "regex ==" "regex >=" - ''; - nativeCheckInputs = [ pytestCheckHook ]; disabledTests = [ # These languages require additional dictionaries that aren't packaged @@ -46,7 +49,7 @@ buildPythonPackage rec { meta = with lib; { description = "A library for looking up the frequencies of words in many languages, based on many sources of data"; - homepage = "https://github.com/LuminosoInsight/wordfreq/"; + homepage = "https://github.com/rspeer/wordfreq/"; license = licenses.mit; maintainers = with maintainers; [ ixxie ]; }; |