2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
elastic-transport,
|
|
|
|
elasticsearch-dsl,
|
|
|
|
fetchFromGitHub,
|
|
|
|
ply,
|
|
|
|
pytestCheckHook,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "luqum";
|
|
|
|
version = "0.13.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jurismarches";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "luqum";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM=";
|
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace '--doctest-modules --doctest-glob="test_*.rst"' ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ ply ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
elastic-transport
|
2023-07-15 17:15:38 +00:00
|
|
|
elasticsearch-dsl
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "luqum" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require an Elasticsearch instance
|
|
|
|
"tests/test_elasticsearch/test_es_integration.py"
|
|
|
|
"tests/test_elasticsearch/test_es_naming.py"
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Lucene query parser generating ElasticSearch queries";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/jurismarches/luqum";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/jurismarches/luqum/releases/tag/${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
};
|
|
|
|
}
|