1{ lib
2, boto3
3, botocore
4, buildPythonPackage
5, fastparquet
6, fetchPypi
7, fsspec
8, pandas
9, poetry-core
10, pyarrow
11, pythonOlder
12, sqlalchemy
13, tenacity
14}:
15
16buildPythonPackage rec {
17 pname = "pyathena";
18 version = "3.0.10";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-HvmD1Hi8GCwuox11v0/VdVQlmF5dpPjhgSNfLScz5TY=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 boto3
34 botocore
35 fsspec
36 tenacity
37 ];
38
39 passthru.optional-dependencies = {
40 pandas = [
41 pandas
42 ];
43 sqlalchemy = [
44 sqlalchemy
45 ];
46 arrow = [
47 pyarrow
48 ];
49 fastparquet = [
50 fastparquet
51 ];
52 };
53
54 # Nearly all tests depend on a working AWS Athena instance,
55 # therefore deactivating them.
56 # https://github.com/laughingman7743/PyAthena/#testing
57 doCheck = false;
58
59 pythonImportsCheck = [
60 "pyathena"
61 ];
62
63 meta = with lib; {
64 description = "Python DB API 2.0 (PEP 249) client for Amazon Athena";
65 homepage = "https://github.com/laughingman7743/PyAthena/";
66 changelog = "https://github.com/laughingman7743/PyAthena/releases/tag/v${version}";
67 license = licenses.mit;
68 maintainers = with maintainers; [ turion ];
69 };
70}