python310Packages.rank_bm25: init at 0.2.2
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, numpy
|
||||
}:
|
||||
let
|
||||
pname = "rank_bm25";
|
||||
version = "0.2.2";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit version pname;
|
||||
format = "setuptools";
|
||||
|
||||
# Pypi source package doesn't contain tests
|
||||
src = fetchFromGitHub {
|
||||
owner = "dorianbrown";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-+BxQBflMm2AvCLAFFj52Jpkqn+KErwYXU1wztintgOg=";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
postPatch = ''
|
||||
# Upstream doesn't provide a PKG-INFO file
|
||||
substituteInPlace setup.py --replace "get_version()" "'${version}'"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "rank_bm25" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Collection of BM25 Algorithms in Python";
|
||||
homepage = "https://github.com/dorianbrown/rank_bm25";
|
||||
changelog = "https://github.com/dorianbrown/rank_bm25/releases/tag/${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ happysalada ];
|
||||
};
|
||||
}
|
||||
@@ -10612,6 +10612,8 @@ self: super: with self; {
|
||||
|
||||
rangehttpserver = callPackage ../development/python-modules/rangehttpserver { };
|
||||
|
||||
rank_bm25 = callPackage ../development/python-modules/rank_bm25 { };
|
||||
|
||||
rapidfuzz = callPackage ../development/python-modules/rapidfuzz { };
|
||||
|
||||
rapidfuzz-capi = callPackage ../development/python-modules/rapidfuzz-capi { };
|
||||
|
||||
Reference in New Issue
Block a user