1{
2 lib,
3 boto3,
4 buildPythonPackage,
5 fetchFromGitHub,
6 gremlinpython,
7 hatchling,
8 jsonpath-ng,
9 moto,
10 openpyxl,
11 opensearch-py,
12 pandas,
13 pg8000,
14 progressbar2,
15 pyarrow,
16 pymysql,
17 pyodbc,
18 pyparsing,
19 pytestCheckHook,
20 redshift-connector,
21 requests-aws4auth,
22 setuptools,
23 sparqlwrapper,
24}:
25
26buildPythonPackage rec {
27 pname = "awswrangler";
28 version = "3.13.0";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "aws";
33 repo = "aws-sdk-pandas";
34 tag = version;
35 hash = "sha256-MkoJpztVjwZbGcJTdnLRF7ZtIFd0qGoz/cksEoqLe4w=";
36 };
37
38 pythonRelaxDeps = [
39 "packaging"
40 "pyarrow"
41 ];
42
43 build-system = [ hatchling ];
44
45 dependencies = [
46 boto3
47 gremlinpython
48 jsonpath-ng
49 openpyxl
50 opensearch-py
51 pandas
52 pg8000
53 progressbar2
54 pyarrow
55 pymysql
56 redshift-connector
57 requests-aws4auth
58 setuptools
59 ];
60
61 optional-dependencies = {
62 sqlserver = [ pyodbc ];
63 sparql = [ sparqlwrapper ];
64 };
65
66 nativeCheckInputs = [
67 moto
68 pyparsing
69 pytestCheckHook
70 ];
71
72 pythonImportsCheck = [ "awswrangler" ];
73
74 enabledTestPaths = [
75 # Subset of tests that run in upstream CI (many others require credentials)
76 # https://github.com/aws/aws-sdk-pandas/blob/20fec775515e9e256e8cee5aee12966516608840/.github/workflows/minimal-tests.yml#L36-L43
77 "tests/unit/test_metadata.py"
78 "tests/unit/test_session.py"
79 "tests/unit/test_utils.py"
80 "tests/unit/test_moto.py"
81 ];
82
83 meta = with lib; {
84 description = "Pandas on AWS";
85 homepage = "https://github.com/aws/aws-sdk-pandas";
86 changelog = "https://github.com/aws/aws-sdk-pandas/releases/tag/${src.tag}";
87 license = licenses.asl20;
88 maintainers = with maintainers; [ mcwitt ];
89 };
90}