biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / trino-python-client / default.nix
blobb76dba2b7692eeda6a1a023ee685c7514cecbb8d
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   # build
6   setuptools,
7   # required
8   pytz,
9   requests,
10   tzlocal,
11   # optional
12   requests-kerberos,
13   sqlalchemy,
14   keyring,
15   # tests
16   pytestCheckHook,
17   httpretty,
20 buildPythonPackage rec {
21   pname = "trino-python-client";
22   version = "0.322.0";
23   format = "setuptools";
25   src = fetchFromGitHub {
26     repo = pname;
27     owner = "trinodb";
28     rev = "refs/tags/${version}";
29     hash = "sha256-Hl88Keavyp1QBw67AFbevy/btzNs7UlsKQ93K02YgLM=";
30   };
32   nativeBuildInputs = [ setuptools ];
34   propagatedBuildInputs = [
35     pytz
36     requests
37     tzlocal
38   ];
40   optional-dependencies = lib.fix (self: {
41     kerberos = [ requests-kerberos ];
42     sqlalchemy = [ sqlalchemy ];
43     external-authentication-token-cache = [ keyring ];
44     all = self.kerberos ++ self.sqlalchemy;
45   });
47   nativeCheckInputs = [
48     httpretty
49     pytestCheckHook
50   ] ++ optional-dependencies.all;
52   pythonImportsCheck = [ "trino" ];
54   disabledTestPaths = [
55     # these all require a running trino instance
56     "tests/integration/test_types_integration.py"
57     "tests/integration/test_dbapi_integration.py"
58     "tests/integration/test_sqlalchemy_integration.py"
59   ];
61   pytestFlagsArray = [ "-k 'not auth'" ];
63   meta = with lib; {
64     changelog = "https://github.com/trinodb/trino-python-client/blob/${version}/CHANGES.md";
65     description = "Client for the Trino distributed SQL Engine";
66     homepage = "https://github.com/trinodb/trino-python-client";
67     license = licenses.asl20;
68     maintainers = with maintainers; [ cpcloud ];
69   };