From 3b088c5a7160fe42b93ba3763ef206beb873b5da Mon Sep 17 00:00:00 2001 From: Radik Islamov Date: Mon, 11 Mar 2024 10:25:28 +0500 Subject: [PATCH] python3Packages.panphon: init at 0.20.0 --- .../python-modules/panphon/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/panphon/default.nix diff --git a/pkgs/development/python-modules/panphon/default.nix b/pkgs/development/python-modules/panphon/default.nix new file mode 100644 index 000000000000..6ae629134505 --- /dev/null +++ b/pkgs/development/python-modules/panphon/default.nix @@ -0,0 +1,61 @@ +{ lib +, buildPythonPackage +, fetchPypi + +, unittestCheckHook + +, setuptools + +, unicodecsv +, pyyaml +, regex +, numpy +, editdistance +, munkres +, levenshtein +}: + +buildPythonPackage rec { + pname = "panphon"; + version = "0.20.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-gio52n1NZWeyCK+eJW/Fp827wjvwnMNDFAR4pKa8VcY="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + setuptools # need for pkg_resources + unicodecsv + pyyaml + regex + numpy + editdistance + munkres + levenshtein # need for align_wordlists.py script + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "test" ]; + + pythonImportsCheck = [ + "panphon" + "panphon.segment" + "panphon.distance" + ]; + + meta = with lib; { + description = "Tools for using the International Phonetic Alphabet with phonological features"; + homepage = "https://github.com/dmort27/panphon"; + license = licenses.mit; + maintainers = with maintainers; [ vizid ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2bdd593bd59a..6a41add3c523 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9168,6 +9168,8 @@ self: super: with self; { panflute = callPackage ../development/python-modules/panflute { }; + panphon = callPackage ../development/python-modules/panphon { }; + papermill = callPackage ../development/python-modules/papermill { }; openpaperwork-core = callPackage ../applications/office/paperwork/openpaperwork-core.nix { };