2020-05-29 06:06:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, duckdb
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, pybind11
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2021-07-04 02:40:35 +00:00
|
|
|
, pytest-runner
|
2021-02-17 17:02:09 +00:00
|
|
|
, pytestCheckHook
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duckdb";
|
|
|
|
inherit (duckdb) version src;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# build attempts to use git to figure out its own version. don't want to add
|
|
|
|
# the dependency for something pointless.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace scripts/package_build.py --replace \
|
|
|
|
"'git'" "'false'"
|
|
|
|
'';
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postConfigure = ''
|
|
|
|
cd tools/pythonpkg
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pybind11
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools-scm
|
2021-07-04 02:40:35 +00:00
|
|
|
pytest-runner
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
pythonImportsCheck = [ "duckdb" ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-07-04 02:40:35 +00:00
|
|
|
description = "Python binding for DuckDB";
|
|
|
|
homepage = "https://duckdb.org/";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.mit;
|
2021-07-04 02:40:35 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|