diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix index fd360bfbd120..6e47e4eb389a 100644 --- a/pkgs/development/python-modules/duckdb/default.nix +++ b/pkgs/development/python-modules/duckdb/default.nix @@ -4,31 +4,23 @@ , numpy , pandas , pybind11 +, mypy , setuptools-scm -, pytest-runner , pytestCheckHook }: buildPythonPackage rec { pname = "duckdb"; inherit (duckdb) version src; + format = "setuptools"; - # 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'" - ''; + sourceRoot = "source/tools/pythonpkg"; - postConfigure = '' - cd tools/pythonpkg - export SETUPTOOLS_SCM_PRETEND_VERSION=${version} - ''; + SETUPTOOLS_SCM_PRETEND_VERSION = version; nativeBuildInputs = [ pybind11 setuptools-scm - pytest-runner ]; propagatedBuildInputs = [ @@ -37,10 +29,13 @@ buildPythonPackage rec { ]; checkInputs = [ + mypy pytestCheckHook ]; - pythonImportsCheck = [ "duckdb" ]; + pythonImportsCheck = [ + "duckdb" + ]; meta = with lib; { description = "Python binding for DuckDB";