about summary refs log tree commit diff
path: root/pkgs/development/python-modules/nebula3-python/default.nix
blob: fbc52dd1fe2ed0000fbb4b95d0ceb0c917ac1df3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  future,
  httplib2,
  httpx,
  pdm-backend,
  pytestCheckHook,
  pythonOlder,
  pytz,
  six,
}:

buildPythonPackage rec {
  pname = "nebula3-python";
  version = "3.8.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "vesoft-inc";
    repo = "nebula-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-tpMm13iixtg3ZF4g7YgRLyd/VqJba51QPGPmFRpy0wA=";
  };

  build-system = [ pdm-backend ];

  dependencies = [
    future
    httplib2
    httpx
    pytz
    six
  ] ++ httpx.optional-dependencies.http2;

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "nebula3" ];

  disabledTestPaths = [
    # Tests require a running thrift instance
    "tests/test_connection.py"
    "tests/test_data_from_server.py"
    "tests/test_graph_storage_client.py"
    "tests/test_meta_cache.py"
    "tests/test_parameter.py"
    "tests/test_pool.py"
    "tests/test_session.py"
    "tests/test_session_pool.py"
    "tests/test_ssl_connection.py"
    "tests/test_ssl_pool.py"
  ];

  meta = with lib; {
    description = "Client API of Nebula Graph in Python";
    homepage = "https://github.com/vesoft-inc/nebula-python";
    changelog = "https://github.com/vesoft-inc/nebula-python/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}