python3Packages.ahocorasick-rs: init at 0.22.0

This commit is contained in:
Kerstin Humm 2024-07-22 17:04:35 +02:00 committed by Valentin Gagarin
parent 4c6789467e
commit a536abefad
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchPypi,
rustPlatform,
typing-extensions,
pytestCheckHook,
pyahocorasick,
hypothesis,
pytest-benchmark,
}:
buildPythonPackage rec {
pname = "ahocorasick-rs";
version = "0.22.0";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "ahocorasick_rs";
sha256 = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-CIt/ChNcoqKln6PgeTGp9pfmIWlJj+c5SCPtBhsnT6U=";
};
nativeBuildInputs = with rustPlatform; [
maturinBuildHook
cargoSetupHook
typing-extensions
];
nativeCheckInputs = [
pytest-benchmark
pytestCheckHook
pyahocorasick
hypothesis
];
pythonImportsCheck = [ "ahocorasick_rs" ];
meta = with lib; {
description = "Fast Aho-Corasick algorithm for Python";
homepage = "https://github.com/G-Research/ahocorasick_rs/";
license = licenses.asl20;
maintainers = with maintainers; [ erictapen ];
};
}

View File

@ -127,6 +127,8 @@ self: super: with self; {
aggdraw = callPackage ../development/python-modules/aggdraw { };
ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { };
aigpy = callPackage ../development/python-modules/aigpy { };
aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { };