2022-09-05 13:26:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-14 11:07:48 +00:00
|
|
|
, alembic
|
2023-02-17 23:28:11 +00:00
|
|
|
, lz4
|
|
|
|
, numpy
|
|
|
|
, oauthlib
|
2023-03-14 11:07:48 +00:00
|
|
|
, openpyxl
|
2022-09-05 13:26:30 +00:00
|
|
|
, pandas
|
|
|
|
, poetry-core
|
2023-02-17 23:28:11 +00:00
|
|
|
, pyarrow
|
2022-09-05 13:26:30 +00:00
|
|
|
, pytestCheckHook
|
2023-01-26 12:51:57 +00:00
|
|
|
, pythonOlder
|
2023-02-17 23:28:11 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-03-14 11:07:48 +00:00
|
|
|
, sqlalchemy
|
2023-02-17 23:28:11 +00:00
|
|
|
, thrift
|
2022-09-05 13:26:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "databricks-sql-connector";
|
2023-03-14 11:07:48 +00:00
|
|
|
version = "2.4.0";
|
2022-09-05 13:26:30 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-01-26 12:51:57 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-09-05 13:26:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "databricks";
|
|
|
|
repo = "databricks-sql-python";
|
2022-12-30 19:13:04 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-14 11:07:48 +00:00
|
|
|
hash = "sha256-V8Nl6xr96Xnd1gkw9R0aqXkitLESsAyW7ufTYn6ttLg=";
|
2022-09-05 13:26:30 +00:00
|
|
|
};
|
|
|
|
|
2023-02-17 23:28:11 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"numpy"
|
|
|
|
"thrift"
|
|
|
|
];
|
2022-09-05 13:26:30 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-02-17 23:28:11 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-09-05 13:26:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-14 11:07:48 +00:00
|
|
|
alembic
|
2023-02-17 23:28:11 +00:00
|
|
|
lz4
|
|
|
|
numpy
|
|
|
|
oauthlib
|
2023-03-14 11:07:48 +00:00
|
|
|
openpyxl
|
2022-09-05 13:26:30 +00:00
|
|
|
pandas
|
|
|
|
pyarrow
|
2023-03-14 11:07:48 +00:00
|
|
|
sqlalchemy
|
2023-02-17 23:28:11 +00:00
|
|
|
thrift
|
2022-09-05 13:26:30 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-05 13:26:30 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-01-26 12:51:57 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"databricks"
|
|
|
|
];
|
2022-09-05 13:26:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Databricks SQL Connector for Python";
|
2022-09-27 12:27:48 +00:00
|
|
|
homepage = "https://docs.databricks.com/dev-tools/python-sql-connector.html";
|
2023-01-26 12:51:57 +00:00
|
|
|
changelog = "https://github.com/databricks/databricks-sql-python/blob/v${version}/CHANGELOG.md";
|
2022-09-05 13:26:30 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ harvidsen ];
|
2023-03-28 22:47:32 +00:00
|
|
|
# No SQLAlchemy 2.0 support
|
|
|
|
# https://github.com/databricks/databricks-sql-python/issues/91
|
|
|
|
broken = true;
|
2022-09-05 13:26:30 +00:00
|
|
|
};
|
|
|
|
}
|