From 846bf21967a372a24963697ed01eb643469101c6 Mon Sep 17 00:00:00 2001 From: Radik Islamov Date: Wed, 20 Mar 2024 05:08:43 +0500 Subject: [PATCH] python3Packages.bpemb: init at 0.3.5 (#295263) * python311Packages.bpemb: init at 0.3.2 * python311Packages.bpemb: 0.3.2 -> 0.3.5 --- .../python-modules/bpemb/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/bpemb/default.nix diff --git a/pkgs/development/python-modules/bpemb/default.nix b/pkgs/development/python-modules/bpemb/default.nix new file mode 100644 index 000000000000..ab6d5357e53b --- /dev/null +++ b/pkgs/development/python-modules/bpemb/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +, setuptools + +, gensim +, numpy +, requests +, sentencepiece +, tqdm +}: + +buildPythonPackage { + pname = "bpemb"; + version = "0.3.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "bheinzerling"; + repo = "bpemb"; + rev = "ec85774945ca76dd93c1d9b4af2090e80c5779dc"; + hash = "sha256-nVaMXb5TBhO/vWE8AYAA3P9dSPI8O+rmzFvbEj8VEkE="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + gensim + numpy + requests + sentencepiece + tqdm + ]; + + # need network connection for tests + doCheck = false; + + pythonImportsCheck = [ + "bpemb" + ]; + + meta = with lib; { + description = "Byte-pair embeddings in 275 languages"; + homepage = "https://github.com/bheinzerling/bpemb"; + license = licenses.mit; + maintainers = with maintainers; [ vizid ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1a37a8282e82..6e54f1468353 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1686,6 +1686,8 @@ self: super: with self; { boxx = callPackage ../development/python-modules/boxx { }; + bpemb = callPackage ../development/python-modules/bpemb { }; + bpycv = callPackage ../development/python-modules/bpycv {}; bpython = callPackage ../development/python-modules/bpython { };