Files
nixpkgs/pkgs/development/python-modules/finalfusion/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

59 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 = with lib; {
description = "Python module for using finalfusion, word2vec, and fastText word embeddings";
homepage = "https://github.com/finalfusion/finalfusion-python/";
maintainers = [ ];
platforms = platforms.all;
license = licenses.blueOak100;
};
}