
If a Python package does not come with either `format` or `pyproject` we consider it a setuptools build, that calls `setup.py` directly, which is deprecated. This change, as a first step, migrates a large chunk of these packages to set setuptools as their explicit format This is so we can unify the problem space for the next step of the migration.
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyahocorasick";
|
|
version = "2.2.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "WojciechMula";
|
|
repo = "pyahocorasick";
|
|
tag = "v${version}";
|
|
hash = "sha256-lFJhHDN9QAKw5dqzgjRxcs+7+LuTqP9qQ68B5LlCNmU=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "ahocorasick" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python module implementing Aho-Corasick algorithm";
|
|
longDescription = ''
|
|
This Python module is a fast and memory efficient library for exact or
|
|
approximate multi-pattern string search meaning that you can find multiple
|
|
key strings occurrences at once in some input text.
|
|
'';
|
|
homepage = "https://github.com/WojciechMula/pyahocorasick";
|
|
changelog = "https://github.com/WojciechMula/pyahocorasick/blob/${src.tag}/CHANGELOG.rst";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|