2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, alembic
|
2023-03-04 12:14:45 +00:00
|
|
|
, lz4
|
|
|
|
, numpy
|
|
|
|
, oauthlib
|
2023-03-15 16:39:30 +00:00
|
|
|
, openpyxl
|
2022-09-30 11:47:45 +00:00
|
|
|
, pandas
|
|
|
|
, poetry-core
|
2023-03-04 12:14:45 +00:00
|
|
|
, pyarrow
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytestCheckHook
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
2023-03-15 16:39:30 +00:00
|
|
|
, sqlalchemy
|
2023-03-04 12:14:45 +00:00
|
|
|
, thrift
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "databricks-sql-connector";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "3.0.2";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "databricks";
|
|
|
|
repo = "databricks-sql-python";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-Uvy5/a9YFdPKpZ3B+Yvrvp7uZCY/My45w1lDqX7zJvI=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"numpy"
|
|
|
|
"thrift"
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
alembic
|
2023-03-04 12:14:45 +00:00
|
|
|
lz4
|
|
|
|
numpy
|
|
|
|
oauthlib
|
2023-03-15 16:39:30 +00:00
|
|
|
openpyxl
|
2022-09-30 11:47:45 +00:00
|
|
|
pandas
|
|
|
|
pyarrow
|
2023-03-15 16:39:30 +00:00
|
|
|
sqlalchemy
|
2023-03-04 12:14:45 +00:00
|
|
|
thrift
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"databricks"
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Databricks SQL Connector for Python";
|
|
|
|
homepage = "https://docs.databricks.com/dev-tools/python-sql-connector.html";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/databricks/databricks-sql-python/blob/v${version}/CHANGELOG.md";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ harvidsen ];
|
2023-03-30 22:05:00 +00:00
|
|
|
# No SQLAlchemy 2.0 support
|
|
|
|
# https://github.com/databricks/databricks-sql-python/issues/91
|
|
|
|
broken = true;
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
}
|