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