From a470a23a779bb38b10e6334a7205601de2f44c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 17 Aug 2020 10:02:06 +0200 Subject: [PATCH] python3Packages.finalfusion: init at 0.7.1 --- .../python-modules/finalfusion/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/finalfusion/default.nix diff --git a/pkgs/development/python-modules/finalfusion/default.nix b/pkgs/development/python-modules/finalfusion/default.nix new file mode 100644 index 00000000000000..62287487e3b785 --- /dev/null +++ b/pkgs/development/python-modules/finalfusion/default.nix @@ -0,0 +1,56 @@ +{ buildPythonPackage +, fetchFromGitHub +, lib +, isPy3k +, cython +, numpy +, toml +, pytest +}: + +buildPythonPackage rec { + pname = "finalfusion"; + version = "0.7.1"; + + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "finalfusion"; + repo = "finalfusion-python"; + rev = version; + sha256 = "0pwzflamxqvpl1wcz0zbhhd6aa4xn18rmza6rggaic3ckidhyrh4"; + }; + + nativeBuildInputs = [ + cython + ]; + + propagatedBuildInputs = [ + numpy + toml + ]; + + checkInputs = [ + pytest + ]; + + postPatch = '' + patchShebangs tests/integration + ''; + + checkPhase = '' + # Regular unit tests. + pytest + + # Integration tests for command-line utilities. + PATH=$PATH:$out/bin tests/integration/all.sh + ''; + + meta = with lib; { + description = "Python module for using finalfusion, word2vec, and fastText word embeddings"; + homepage = "https://github.com/finalfusion/finalfusion-python/"; + maintainers = with maintainers; [ danieldk ]; + platforms = platforms.all; + license = licenses.blueOak100; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 76e5fd9dcd1b7b..5337b3e610af26 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -764,6 +764,8 @@ in { filemagic = callPackage ../development/python-modules/filemagic { }; + finalfusion = callPackage ../development/python-modules/finalfusion { }; + fints = callPackage ../development/python-modules/fints { }; fire = callPackage ../development/python-modules/fire { };