mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #271432 from fabaff/luqum-fix
python311Packages.luqum: refactor
This commit is contained in:
commit
1054ed56aa
@ -1,40 +1,61 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
# dependencies
|
||||
, ply
|
||||
# test dependencies
|
||||
, elastic-transport
|
||||
, elasticsearch-dsl
|
||||
, fetchFromGitHub
|
||||
, ply
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
}:
|
||||
let
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "luqum";
|
||||
version = "0.13.0";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jurismarches";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
repo = "luqum";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace '--doctest-modules --doctest-glob="test_*.rst" --cov=luqum --cov-branch --cov-report html --no-cov-on-fail' ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ply
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
elastic-transport
|
||||
elasticsearch-dsl
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
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 = "A lucene query parser generating ElasticSearch queries and more !";
|
||||
description = "A 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 ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user