1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ply
5, pytestCheckHook
6, pythonOlder
7, setuptools
8}:
9
10buildPythonPackage rec {
11 pname = "jsonpath-ng";
12 version = "1.6.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "h2non";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-q4kIH/2+VKdlSa+IhJ3ymHpc5gmml9lW4aJS477/YSo=";
22 };
23
24 propagatedBuildInputs = [
25 ply
26 setuptools
27 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 ];
32
33 disabledTestPaths = [
34 # Exclude tests that require oslotest
35 "tests/test_jsonpath_rw_ext.py"
36 ];
37
38 pythonImportsCheck = [
39 "jsonpath_ng"
40 ];
41
42 meta = with lib; {
43 description = "JSONPath implementation";
44 homepage = "https://github.com/h2non/jsonpath-ng";
45 changelog = "https://github.com/h2non/jsonpath-ng/blob/v${version}/History.md";
46 license = with licenses; [ asl20 ];
47 maintainers = with maintainers; [ fab ];
48 };
49}