Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 26 additions & 29 deletions pkgs/development/python-modules/duckdb-engine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,42 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
python,

# build-system
poetry-core,

# dependencies
duckdb,
sqlalchemy,

# testing
fsspec,
hypothesis,
pandas,
pyarrow,
poetry-core,
pytest-remotedata,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
snapshottest,
sqlalchemy,
typing-extensions,
}:

buildPythonPackage rec {
pname = "duckdb-engine";
version = "0.15.0";
version = "0.17.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
repo = "duckdb_engine";
owner = "Mause";
tag = "v${version}";
hash = "sha256-mxv6xYO31MDzHvIf7Zk+kFtm6fX3x3AaJNn7RhvJ2fY=";
hash = "sha256-AhYCiIhi7jMWKIdDwZZ8MgfDg3F02/jooGLOp6E+E5g=";
};

nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];

propagatedBuildInputs = [
dependencies = [
duckdb
sqlalchemy
];
Expand All @@ -46,11 +50,12 @@ buildPythonPackage rec {

checkInputs =
[
fsspec
hypothesis
pandas
pyarrow
pytest-remotedata
typing-extensions
pyarrow
]
++ lib.optionals (pythonOlder "3.12") [
# requires wasmer which is broken for python 3.12
Expand All @@ -68,27 +73,19 @@ buildPythonPackage rec {
"duckdb_engine/tests/test_datatypes.py"
];

disabledTests =
[
# incompatible with duckdb 1.1.1
"test_with_cache"
# these aren't set for some reason
"test_user_agent"
"test_user_agent_with_custom_user_agent"
]
++ lib.optionals (python.pythonVersion == "3.11") [
# incompatible with duckdb 1.1.1
"test_all_types_reflection"
"test_nested_types"
];
disabledTests = [
# user agent not available in nixpkgs
"test_user_agent"
"test_user_agent_with_custom_user_agent"
];

pythonImportsCheck = [ "duckdb_engine" ];

meta = with lib; {
meta = {
description = "SQLAlchemy driver for duckdb";
homepage = "https://github.com/Mause/duckdb_engine";
changelog = "https://github.com/Mause/duckdb_engine/blob/${src.tag}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cpcloud ];
};
}