2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
alembic,
|
|
|
|
lz4,
|
|
|
|
numpy,
|
|
|
|
oauthlib,
|
|
|
|
openpyxl,
|
|
|
|
pandas,
|
|
|
|
poetry-core,
|
|
|
|
pyarrow,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
sqlalchemy,
|
|
|
|
thrift,
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "databricks-sql-connector";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.0";
|
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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-LiA+zZuhPPXgBb8B1vZ/PuAYMrBXzxgd1CXwugf0mk8=";
|
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
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|