about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/awswrangler/default.nix
blob: 7cd356214d56812ae710115298269854eeef7a60 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{ backoff
, sparqlwrapper
, boto3
, buildPythonPackage
, fetchFromGitHub
, gremlinpython
, jsonpath-ng
, lib
, moto
, openpyxl
, opensearch-py
, pandas
, pg8000
, poetry-core
, progressbar2
, pyarrow
, pymysql
, pyodbc
, pyparsing
, pytestCheckHook
, pythonOlder
, redshift-connector
, requests-aws4auth
}:

buildPythonPackage rec {
  pname = "awswrangler";
  version = "3.7.1";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "aws";
    repo = "aws-sdk-pandas";
    rev = "refs/tags/${version}";
    hash = "sha256-6HocnnPG/Id+49NN3WqnSYEnsijA2r13WM2NJIxVwFs=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    boto3
    gremlinpython
    jsonpath-ng
    openpyxl
    opensearch-py
    pandas
    pg8000
    progressbar2
    pyarrow
    pymysql
    redshift-connector
    requests-aws4auth
  ];

  nativeCheckInputs = [
    moto
    pyparsing
    pytestCheckHook
  ];

  pytestFlagsArray = [
    # Subset of tests that run in upstream CI (many others require credentials)
    # https://github.com/aws/aws-sdk-pandas/blob/20fec775515e9e256e8cee5aee12966516608840/.github/workflows/minimal-tests.yml#L36-L43
    "tests/unit/test_metadata.py"
    "tests/unit/test_session.py"
    "tests/unit/test_utils.py"
    "tests/unit/test_moto.py"
  ];

  passthru.optional-dependencies = {
    sqlserver = [
      pyodbc
    ];
    sparql = [
      sparqlwrapper
    ];
  };

  meta = with lib; {
    description = "Pandas on AWS";
    homepage = "https://github.com/aws/aws-sdk-pandas";
    changelog = "https://github.com/aws/aws-sdk-pandas/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ mcwitt ];
  };
}