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.5";
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-CzS6aVOFkBSJ9+0KJOaJLxK2ZiRY4OybNkCX5VdybqY=";
33 };
34
35 pythonRelaxDeps = [
36 "pandas"
37 "pyarrow"
38 "thrift"
39 ];
40
41 nativeBuildInputs = [
42 poetry-core
43 ];
44
45 propagatedBuildInputs = [
46 alembic
47 lz4
48 numpy
49 oauthlib
50 openpyxl
51 pandas
52 pyarrow
53 sqlalchemy
54 thrift
55 requests
56 urllib3
57 ];
58
59 nativeCheckInputs = [ pytestCheckHook ];
60
61 enabledTestPaths = [ "tests/unit" ];
62
63 pythonImportsCheck = [ "databricks" ];
64
65 meta = with lib; {
66 description = "Databricks SQL Connector for Python";
67 homepage = "https://docs.databricks.com/dev-tools/python-sql-connector.html";
68 changelog = "https://github.com/databricks/databricks-sql-python/blob/${src.tag}/CHANGELOG.md";
69 license = licenses.asl20;
70 maintainers = with maintainers; [ harvidsen ];
71 };
72}