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