1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, alembic
5, lz4
6, numpy
7, oauthlib
8, openpyxl
9, pandas
10, poetry-core
11, pyarrow
12, pytestCheckHook
13, pythonOlder
14, pythonRelaxDepsHook
15, sqlalchemy
16, thrift
17}:
18
19buildPythonPackage rec {
20 pname = "databricks-sql-connector";
21 version = "2.9.3";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "databricks";
28 repo = "databricks-sql-python";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-y4Pmkgq3hv6mVu0zBsoiqNOcsHM0mxTNiJOCCZ+rwA8=";
31 };
32
33 pythonRelaxDeps = [
34 "numpy"
35 "thrift"
36 ];
37
38 nativeBuildInputs = [
39 poetry-core
40 pythonRelaxDepsHook
41 ];
42
43 propagatedBuildInputs = [
44 alembic
45 lz4
46 numpy
47 oauthlib
48 openpyxl
49 pandas
50 pyarrow
51 sqlalchemy
52 thrift
53 ];
54
55 nativeCheckInputs = [
56 pytestCheckHook
57 ];
58
59 pytestFlagsArray = [
60 "tests/unit"
61 ];
62
63 pythonImportsCheck = [
64 "databricks"
65 ];
66
67 meta = with lib; {
68 description = "Databricks SQL Connector for Python";
69 homepage = "https://docs.databricks.com/dev-tools/python-sql-connector.html";
70 changelog = "https://github.com/databricks/databricks-sql-python/blob/v${version}/CHANGELOG.md";
71 license = licenses.asl20;
72 maintainers = with maintainers; [ harvidsen ];
73 # No SQLAlchemy 2.0 support
74 # https://github.com/databricks/databricks-sql-python/issues/91
75 broken = true;
76 };
77}