depot/third_party/nixpkgs/pkgs/development/python-modules/luqum/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

59 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
elastic-transport,
elasticsearch-dsl,
fetchFromGitHub,
ply,
pytestCheckHook,
pytest-cov-stub,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "luqum";
version = "0.13.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "jurismarches";
repo = "luqum";
rev = "refs/tags/${version}";
hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '--doctest-modules --doctest-glob="test_*.rst"' ""
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ ply ];
nativeCheckInputs = [
elastic-transport
elasticsearch-dsl
pytestCheckHook
pytest-cov-stub
];
pythonImportsCheck = [ "luqum" ];
disabledTestPaths = [
# Tests require an Elasticsearch instance
"tests/test_elasticsearch/test_es_integration.py"
"tests/test_elasticsearch/test_es_naming.py"
];
meta = with lib; {
description = "Lucene query parser generating ElasticSearch queries";
homepage = "https://github.com/jurismarches/luqum";
changelog = "https://github.com/jurismarches/luqum/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
};
}