nixpkgs/pkgs/development/python-modules/py-stringmatching/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

56 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
setuptools,
# dependencies
numpy,
six,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "py-stringmatching";
version = "0.4.6";
src = fetchFromGitHub {
owner = "anhaidgroup";
repo = "py_stringmatching";
tag = "v${version}";
hash = "sha256-gQiIIN0PeeM81ZHsognPFierf9ZXasq/JqxsYZmLAnU=";
};
pyproject = true;
build-system = [
setuptools
cython
];
dependencies = [
numpy
six
];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
cd $out
'';
pythonImportsCheck = [ "py_stringmatching" ];
meta = {
broken = lib.versionAtLeast numpy.version "2";
description = "Python string matching library including string tokenizers and string similarity measures";
homepage = "https://github.com/anhaidgroup/py_stringmatching";
changelog = "https://github.com/anhaidgroup/py_stringmatching/blob/v${version}/CHANGES.txt";
license = lib.licenses.bsd3;
};
}