Merge pull request #271432 from fabaff/luqum-fix

python311Packages.luqum: refactor

authored by Fabian Affolter and committed by GitHub 1054ed56 ae4f0a84

+33 -12
+33 -12
pkgs/development/python-modules/luqum/default.nix
··· 1 { lib 2 , buildPythonPackage 3 , fetchFromGitHub 4 - , pythonOlder 5 - # dependencies 6 , ply 7 - # test dependencies 8 - , elasticsearch-dsl 9 }: 10 - let 11 pname = "luqum"; 12 version = "0.13.0"; 13 - in 14 - buildPythonPackage { 15 - inherit pname version; 16 - format = "setuptools"; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "jurismarches"; 22 - repo = pname; 23 - rev = version; 24 hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM="; 25 }; 26 27 propagatedBuildInputs = [ 28 ply 29 ]; 30 31 nativeCheckInputs = [ 32 elasticsearch-dsl 33 ]; 34 35 meta = with lib; { 36 - description = "A lucene query parser generating ElasticSearch queries and more !"; 37 homepage = "https://github.com/jurismarches/luqum"; 38 license = licenses.asl20; 39 maintainers = with maintainers; [ happysalada ]; 40 };
··· 1 { lib 2 , buildPythonPackage 3 + , elastic-transport 4 + , elasticsearch-dsl 5 , fetchFromGitHub 6 , ply 7 + , pytestCheckHook 8 + , pythonOlder 9 + , setuptools 10 }: 11 + 12 + buildPythonPackage rec { 13 pname = "luqum"; 14 version = "0.13.0"; 15 + pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "jurismarches"; 21 + repo = "luqum"; 22 + rev = "refs/tags/${version}"; 23 hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM="; 24 }; 25 26 + postPatch = '' 27 + substituteInPlace pyproject.toml \ 28 + --replace '--doctest-modules --doctest-glob="test_*.rst" --cov=luqum --cov-branch --cov-report html --no-cov-on-fail' "" 29 + ''; 30 + 31 + nativeBuildInputs = [ 32 + setuptools 33 + ]; 34 + 35 propagatedBuildInputs = [ 36 ply 37 ]; 38 39 nativeCheckInputs = [ 40 + elastic-transport 41 elasticsearch-dsl 42 + pytestCheckHook 43 + ]; 44 + 45 + pythonImportsCheck = [ 46 + "luqum" 47 + ]; 48 + 49 + disabledTestPaths = [ 50 + # Tests require an Elasticsearch instance 51 + "tests/test_elasticsearch/test_es_integration.py" 52 + "tests/test_elasticsearch/test_es_naming.py" 53 ]; 54 55 meta = with lib; { 56 + description = "A lucene query parser generating ElasticSearch queries"; 57 homepage = "https://github.com/jurismarches/luqum"; 58 + changelog = "https://github.com/jurismarches/luqum/releases/tag/${version}"; 59 license = licenses.asl20; 60 maintainers = with maintainers; [ happysalada ]; 61 };