nixpkgs/pkgs/development/python-modules/finalfusion/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

58 lines
1.2 KiB
Nix

{
buildPythonPackage,
fetchFromGitHub,
lib,
isPy3k,
cython,
numpy,
toml,
pytest,
}:
buildPythonPackage rec {
pname = "finalfusion";
version = "0.7.1";
format = "setuptools";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "finalfusion";
repo = "finalfusion-python";
rev = version;
sha256 = "0pwzflamxqvpl1wcz0zbhhd6aa4xn18rmza6rggaic3ckidhyrh4";
};
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [
numpy
toml
];
nativeCheckInputs = [ pytest ];
postPatch = ''
patchShebangs tests/integration
# `np.float` was a deprecated alias of the builtin `float`
substituteInPlace tests/test_storage.py \
--replace 'dtype=np.float)' 'dtype=float)'
'';
checkPhase = ''
# Regular unit tests.
pytest
# Integration tests for command-line utilities.
PATH=$PATH:$out/bin tests/integration/all.sh
'';
meta = {
description = "Python module for using finalfusion, word2vec, and fastText word embeddings";
homepage = "https://github.com/finalfusion/finalfusion-python/";
maintainers = [ ];
platforms = lib.platforms.all;
license = lib.licenses.blueOak100;
};
}